28
loading...
This website collects cookies to deliver better user experience
Microservices are modular and interchangeable by design. That means your developers can work on them without affecting other parts of your system. It also means you can quickly make and test changes and slot in older or alternate versions of your code.
Being able to respond fast and hone in on potential problem areas are key advantages of microservices. By contrast, a large platform may take time to fix holes, and the process of upgrading might be out of your control.
BigCommerce offers you several templates and has plenty of features, but you are also at the mercy of any changes it makes.
With your own microservices, you can update them when you like. You can choose the fields and data format to work with and decide how your services connect and share information.
You can make every decision related to your business yourself. That may seem daunting, but specialists can help, even if you’re using your own solution.
While BigCommerce is extendable, many of the upgrades aren’t cheap. Even one can significantly add to your costs, and the more you have, the bigger the hit.
Estimates suggest ongoing costs for microservices can drop by up to 90%, and that’s before you factor in the productivity gains for your developers.
** Field Name ** | ** Data Type ** |
---|---|
id | string |
customerId | integer |
string | |
currency | object |
isTaxIncluded | boolean |
baseAmount | number |
discountAmount | number |
cartAmount | number |
coupons | array[object] |
discounts | array[object] |
lineItems | object |
createdTime | string |
updatedTime | string |
locale | string |
// Imports for AWS
const { SQSClient, SendMessageCommand } = require("@aws-sdk/client-sqs");
// Set this to your region
const REGION = "us-east-1";
// The parameters, swap in what you need, and out what you don’t
const params = {
DelaySeconds: 10,
MessageAttributes: {
id: {
DataType: "String",
StringValue: "475",
},
customerId: {
DataType: "String",
StringValue: "562567",
},
baseAmount: {
DataType: "Number",
StringValue: "79.99",
},
discountAmount: {
DataType: "Number",
StringValue: "59.99",
},
},
MessageBody:
"Shopping cart information.",
QueueUrl: "SQS_QUEUE_URL", // Your queue URL, e.g. 'https://sqs.REGION.amazonaws.com/ACCOUNT-ID/QUEUE-NAME'
};
const sqs = new SQSClient({ region: REGION });
const run = async () => {
try {
const data = await sqs.send(new SendMessageCommand(params));
console.log("Success, message sent. MessageID:", data.MessageId);
} catch (err) {
console.log("Error", err);
}
};
run();
28