securitySchemes:
customClientSecurity: !include security-scheme/customClientSecurityScheme.raml
securedBy:
- customClientSecurity
properties:
my-object:
type: object
additionalProperties: false
properties:
id:
type: string
required: true
maxLength: 161
uses:
warning-lib: /exchange_modules/98b6d1c2-304e-408c-8732-feffa0df17c0/ana-common-warn/1.0.0/ana-common-warn.raml
traits:
header-access-token-required: !include /exchange_modules/98b6d1c2-304e-408c-8732-feffa0df17c0/1.0.0/header-access-token-required.raml
types:
credential: !include /common/dataTypes/credential.raml
resourceTypes:
create-order: !include /orders/create-order/resourceType.raml
#%RAML 1.0 SecurityScheme
type: x-client-id-and-secret-custom
description: Client ID and Secret Based Security
describedBy:
headers:
client_id:
description: Client Id in base 64 format
client_secret:
description: Client Secret in base 64 format
responses:
401:
description: "Unauthorized."
Example 1 : How to use
securitySchemes:
customClientSecurity: !include security-scheme/customClientSecurityScheme.raml
securedBy:
- customClientSecurity
#%RAML 1.0 SecurityScheme
type: x-custom-oAuth
description: OAuth Based Security
describedBy:
headers:
Authorization:
description: Token to validate the client APP
responses:
401:
description: "Unauthorized."
Example 2 : How to use
securitySchemes:
customOAuthSecurity: !include security-scheme/customOAuthSecurityScheme.raml
securedBy:
- customOAuthSecurity
Worker Size | Worker Memory | Heap Memory | Disk Storage Size |
---|---|---|---|
0.1 vCores | 1 GB | 500 MB | 8 GB |
0.2 vCores | 2 GB | 1 GB | 8 GB |
1 vCore | 4 GB | 2 GB | 12 GB |
2 vCores | 8 GB | 4 GB | 40 GB |
4 vCores | 16 GB | 8 GB | 88 GB |
8 vCores | 32 GB | 16 GB | 168 GB |
16 vCores | 64 GB | 32 GB | 328 GB |
Horizontal scaling | Vertical scaling |
---|---|
When new server racks are added to the existing system to meet the higher expectation, it is known as horizontal scaling. | When new resources are added in the existing system to meet the expectation, it is known as vertical scaling |
It expands the size of the existing system horizontally. | It expands the size of the existing system vertically. |
It is easier to upgrade. | It is harder to upgrade and may involve downtime. |
It is difficult to implement | It is easy to implement |
It is costlier, as new server racks comprise a lot of resources | It is cheaper as we need to just add new resources |
It takes more time to be done | It takes less time to be done |
High resilience and fault tolerance | Single point of failure |
Examples of databases that can be easily scaled- Cassandra, MongoDB, Google Cloud Spanner | Examples of databases that can be easily scaled- MySQL, Amazon RDS |
Horizontal scaling | Vertical scaling | |
---|---|---|
Description | Increase or decrease the number of nodes in a cluster or system to handle an increase or decrease in workload | Increase or decrease the power of a system to handle increased or reduced workload |
Example | Add or reduce the number of virtual machines (VM) in a cluster of VMs | Add or reduce the CPU or memory capacity of the existing VM |
Execution | Scale in/out | Scale up/down |
Workload distribution | Workload is distributed across multiple nodes.Parts of the workload reside on these different nodes | A single node handles the entire workload. |
Concurrency | Distributes multiple jobs across multiple machines over the network, at a go. This reduces the workload on each machine | Relies on multi-threading on the existing machine to handle multiple requests at the same time |
Required architecture | Distributed | Any |
Implementation | Takes more time, expertise, and effort | Takes less time, expertise, and effort |
Complexity and maintenance | Higher | lower |
Configuration | This requires modifying a sequential piece of logic in order to run workloads concurrently on multiple machines | No need to change the logic. The same code can run on a higher-spec device |
Downtime | No | Yes |
Load balancing | Necessary to actively distribute workload across the multiple nodes | Not required in the single node |
Failure resilience | Low because other machines in the cluster offer backup | High since it’s a single source of failure |
Costs | High costs initially; optimal over time | Low-cost initially; less cost-effective over time |
Networking | Quick inter-machine communication | Slower machine-to-machine communication |
Performance | Higher | Lower |
Limitation | Add as many machines as you can | Limited to the resource capacity the single machine can handle |
#%RAML 1.0
title: Employee Types
types:
Employee:
type: object
properties:
name:
required: true
type: string
#%RAML 1.0
title: Email Types
types:
Email:
type: object
properties:
name:
type: string
Emails:
type: array
items: Email
minItems: 1
uniqueItems: true
#%RAML 1.0
title: Phone and Notebook Types
types:
Phone:
type: object
properties:
manufacturer:
type: string
numberOfSIMCards:
type: number
kind: string
Notebook:
type: object
properties:
manufacturer:
type: string
numberOfUSBPorts:
type: number
kind: string
Device:
type: Phone | Notebook
#%RAML 1.0
title: Cat and Dog Types
types:
CatOrDog:
type: Cat | Dog # elements: Cat or Dog
Cat:
type: object
properties:
name: string
color: string
Dog:
type: object
properties:
name: string
fangs: string
#%RAML 1.0
types:
EmailAddress:
type: string
pattern: ^.+@.+\..+$
minLength: 3
maxLength: 320
#%RAML 1.0
types:
Weight:
type: number
minimum: -1.1
maximum: 20.9
format: float
multipleOf: 1.1
#%RAML 1.0
types:
Age:
type: integer
minimum: -3
maximum: 5
format: int8
#%RAML 1.0
types:
IsMarried:
type: boolean
#%RAML 1.0
types:
birthday:
type: date-only # no implications about time or offset
example: 2015-05-23
lunchtime:
type: time-only # no implications about date or offset
example: 12:30:00
fireworks:
type: datetime-only # no implications about offset
example: 2015-07-04T21:00:00
created:
type: datetime
example: 2016-02-28T16:41:41.090Z
format: rfc3339 # the default, so no need to specify
If-Modified-Since:
type: datetime
example: Sun, 28 Feb 2016 16:41:41 GMT
format: rfc2616 # this time it's required, otherwise, the example format is invalid
#%RAML 1.0
types:
userPicture:
type: file
fileTypes: ['image/jpeg', 'image/png']
maxLength: 307200
customFile:
type: file
fileTypes: ['*/*'] # any file type allowed
maxLength: 1048576
#%RAML 1.0
types:
NilValue:
type: object
properties:
name:
comment: nil
example:
name: Fred
comment: # Providing a value here is not allowed.
#%RAML 1.0
types:
NilValue:
type: object
properties:
name:
comment: nil | string # equivalent to ->
# comment: string?
example:
name: Fred
comment: # Providing a value or not providing a value here is allowed.
Attribute | Description |
---|---|
maxRedeliveryCount | The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message. |
useSecureHash | The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message. |
messageDigestAlgorithm | The secure hashing algorithm to use. If not set, the default is SHA-256. |
idExpression | Defines one or more expressions to use to determine when a message has been redelivered.This property may only be set if useSecureHash is false. |
object-store-ref | The object store where the redelivery counter for each message is going to be stored. |
- policyRef:
name: rate-limiting-policy
config:
rateLimits:
- maximumRequests: 3
timePeriodInMilliseconds: 6000
keySelector: "#[attributes.method]"
exposeHeaders: true
clusterizable: false
VM | MQ |
---|---|
VM is Mule's internal transport for messaging/queueing. | Anypoint MQ is Mulesoft's Cloud Messaging platform. |
The VM transport is for intra-JVM communication between Mule flows. | This can be used by other applications - not just Mule. |
When we use a VM in our flow, we can communicate between different flows in the application. It can only be used by Mule applications. | It can also be used across multiple Mule apps regardless of domains or cluster, well suited for Cloudhub applications. |
No existing broker infrastructure needs to be setup. | No infra setup, all in the cloud. |
Capability | CloudHub 2.0 | CloudHub 1.0 |
---|---|---|
Persistent VM Queues | Not supported | Supported |
Capability | CloudHub 2.0 | CloudHub 1.0 |
---|---|---|
URL rewriting | Supported - APP-Level | Supported - DLB-Level |
Multiple truststores (client certificates for mutual TLS) | Supported | Not Supported |
Multiple custom endpoints per app | Supported | Partially Supported |
TLS 1.0 | Not Supported | Supported |
Load balancer logs | Supported | Not Supported |
Ingress logs | Supported | Not Supported |
Capability | CloudHub 2.0 | CloudHub 1.0 |
---|---|---|
Virtual Private Cloud | Fully managed - through private space | Fully managed - through Anypoint VPC |
Virtual Private Network | Fully managed - through private space | Fully managed - through Anypoint VPN |
AWS Transit Gateway | Supported - through private space | Supported - through Anypoint VPC |
Direct Connect | Not Supported | Supported - not self-serve |
VPC Peering | Not Supported | Supported - not self-serve |
Outbound firewall rules | Supported - through private space | Not Supported |
Static IP addresses | Supported - through private space | Supported - through per app |
Capability | CloudHub 2.0 | CloudHub 1.0 |
---|---|---|
DataGraph | Not supported | Supported |
Built-in notifications | Not supported | Supported |
Custom notifications - CloudHub Connector | Not supported | Supported |
Log forwarding | Manual | Supported - Per APP |
Mule clustering | Supported | Not supported |
body:
application/json: !!null
application/xml: !!null
Comments