teleren/devto huggingface dataset:
Difference between Kinesis Data Stream and SQS
Tags: aws, amazonsqs, kinesisdatastream
Published: 2023-12-04 07:47:35

### What is the difference between Kinesis vs SQS?

Amazon Kinesis differs from Amazon's Simple Queue Service (SQS) in that it allows for real-time processing of streaming large data.

### Kinesis Data Stream

AWS Kinesis Streams offers large-scale data input and real-time streaming data processing. It allows you to order records as well as read and/or replay them in the same order.

**Kinesis Data Streams:** 

- Data can be consumed many times 
- Data is deleted after the retention period
- Ordering of records is preserved (at the shard level) – even during replays
- Build multiple applications reading from the same stream independently (Pub/Sub)
- “Streaming MapReduce” querying capability (Spark, Flink...)
- Checkpointing is needed to track the progress of consumption (ex: KCL with DynamoDB) 
- Provisioned mode or on-demand mode
- Stores record for 24 hours by default and can retain streaming data for up to 365 days
- Can send stream records directly to services such as Amazon S3, Amazon Redshift, Amazon ElasticSearch, Splunk, AWS Lambda
- Kinesis Provision Shards at 1MB/s produce and 2MB/s consumer

### AWS SQS

AWS Simple Queue Service (SQS) offers a robust, highly scalable serverless hosted queue for storing messages and delivering data between application components.

**SQS:** 

- Queue, decouple applications 
- One application per queue 
- Records are deleted after consumption (ack/fail) 
- Messages are processed independently for standard queue 
- Ordering for FIFO queues (decreased throughput) 
- Capability to “delay” messages
- Dynamic scaling of load (no-ops) 
- Can configure message retention period from 1 minute to 14 days, default is 4 days
- Other services can be integrated through AWS Lambda
- SQS does batch at 3000msg/sec and 30,000msg/sec in high throughput mode

### Scenarios to use SQS vs Kinesis

**SQS** can be used in 

- Order processing
- Image Processing
- Auto-scaling queues according to messages. 
- Buffer and Batch messages for future processing

**Kinesis Data Streams can be used in:** 

- Rapid collecting and processing of log and event data
- Real-Time metrics and reports
- Real Time data analytics
- Gaming data feed
- Complex Stream Processing
- Data Feed from IoT
Make your Js Components in seconds
Tags: javascript, opensource, contributorswanted, webdev
Published: 2023-12-04 07:46:39

Good morning everyone and happy MonDEV! ☕
I hope you had a good weekend and are ready to get back to coding (for those who haven't started working on the [Advent Of Code](https://adventofcode.com/2023) and therefore haven't left the code these days ;))

Today, for the first time (I promise it won't become a habit), I'd like to play in-house and present you with the tool I developed in the latest weeks during the experiments with npx and GitHub that I talked about here in the newsletter!

The command is called **make-js-component** ( or **MJC** for short ) and allows you to create, by calling it from the terminal, a boilerplate component for any of the main JS frameworks (currently supported: Vue, React, Angular, Svelte, and Qwik).

If you want to try it, all you have to do is take any of your front-end projects and run from the terminal: `npx make-js-component`.
A simple wizard will guide you through the steps needed to create your custom component; in the end, you just have to open it and start working on it!

If you have about ten minutes, I recommend watching [this video](https://www.youtube.com/watch?v=vOZT7T2kUVA&t=1s) on Giuppi's channel, where we talk about the tool and invite you to participate in the development! In fact, the tool is completely open-source to grow better with the contribution of many developers who can bring their needs or expertise through both issues and code! Over the weekend, I also opened the discussions section to allow us to exchange ideas and proposals for the tool's future developments.

So, if you feel like speeding up your front-end workflow or want to have fun getting involved in a young but very dynamic open-source project, here is the [link to the repo](https://github.com/Giuliano1993/make-js-component).

## About YouTube

In addition to the video where we talk about **MJS**, we'll see each other with Giuppi tonight live on his [YouTube channel](https://www.youtube.com/@giuppidev), this time talking a bit about Livewire and waving the flag of good old PHP, which apparently dies every year and comes back stronger than ever each year, a bit like Goku!
Drop by to say hello, and if you haven't already, follow him in his videos and travels; they are rich in interesting insights for code and fantastic guests (but that was already clear 😏).

Once again, and perhaps even more so, I hope I've given you some interesting insights! Hope to see you tonight live or on the repo!
Meanwhile, have a great week and Happy Coding 0_1
Drive Measurable Results with the Leading Philadelphia SEO Company
Tags: seo
Published: 2023-12-04 07:43:33

With so much competition across the online world, businesses can no longer afford to just have an online presence. Simply put, if you want to thrive in the digital marketplace, you need to have an edge over competitors. Don't get lost in the expansive search landscape. Maximize your visibility across search results and make it easier for your customers to find your business with search engine optimization.

Our **[Philadelphia SEO company](https://phillyseopro.com/)** has helped hundreds of businesses gain millions of dollars in revenue, and we can do the same for you too. Our SEO services can help your business rank highly on search results, which in turn encourages the flow of organic traffic to your website and leads to more sales and revenue consistently.

**Explore our Philadelphia SEO Services**

Our 360° SEO expertise allows us to devise winning strategies for our clients. Whether you're looking to gain a foothold in your geographical area, boost your e-commerce sales, scale up your enterprise, or generate brand awareness on a national level, Philly SEO Pro has got you covered.

**● On-page SEO**

We offer a host of site optimization services including content optimization, URL structure, and internal linking.

**● Link Building**

Our specialists can acquire high-quality links from reputable sources to enhance your website's credibility and authority.

**● National SEO**

Attract buyers from across the country with our national SEO services.

**● Local SEO**

Establish a presence in local search results across Philadelphia and surrounding areas with our local SEO services.

**● E-commerce SEO**

Drive high-intent traffic and conversions with an e-commerce SEO strategy designed exclusively for your Philadelphia business.

**● Enterprise SEO**

Amplify brand awareness and compete with the top competitors in your niche with our enterprise SEO services.

Expand your reach and earn more sales with our Philadelphia SEO company. Call 215-598-7341 to speak to one of our experts today.

**Business Name :** Philly SEO Pro

**Address :** 211 N 13th St Unit 221, Philadelphia, PA 19107

**Phone Number :** 215-598-7341
How Kinesis Data Stream Works
Tags: aws, kinesisdatastream, serverless
Published: 2023-12-04 07:43:00

### Kinesis Data Stream

Kinesis data stream is a serverless streaming data service that makes it easy to capture, process, and store data streams at any scale.

Characteristics of the kinesis data stream include but are not limited to:

- Retention between 1 day to 365 days
- Ability to reprocess (replay) data
- Once data is inserted in Kinesis, it can't be deleted (immutability)
- Data that share the same partition goes to the same shard (ordering)
- Producers: AWS SDK, Kinesis Producer Library (KPL), Kinesis Agent
- Consumers: • Write your own: Kinesis Client Library (KCL), AWS SDK • Managed: AWS Lambda, Kinesis Data Firehose, Kinesis Data Analytics

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96leztwvh97mh1d9daiy.png)

### Kinesis Data Streams – Capacity Modes

**Provisioned mode:** You choose the number of shards provisioned, scale manually or using API 

- Each shard gets 1MB/s in (or 1000 records per second)
- Each shard gets 2MB/s out (classic or enhanced fan-out consumer)
- You pay per shard provisioned per hour 

On-demand mode: 

- No need to provision or manage the capacity
- Default capacity provisioned (4 MB/s in or 4000 records per second)
- Scales are automatically based on observed throughput peaks during the last 30 days
- Pay per stream per hour & data in/out per GB

### Kinesis Data Streams Security

- Control access/authorization using IAM policies
- Encryption in flight using HTTPS endpoints
- Encryption at rest using KMS
- You can implement encryption/decryption of data on the client side (harder)
- VPC Endpoints are available for Kinesis to access within VPC
- Monitor API calls using CloudTrail
 

Navigate to AWS Console, search for kinesis and select kinesis data stream

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3bs4y6kul1ai9khx6g95.png)

Fill up the stream name,

Select only one shard for demo purposes, you can select as many shards as you want.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7j5x9vpowunqjbb3i03b.png)

I'm making use of CloudShell

#### For Producer

**`aws kinesis put-record --stream-name DemoStream --partition-key user1 --data "user signup" --cli-binary-format raw-in-base64-out`**

Remember to change your stream name and press enter.

It will generate as ShardId and SequenceNumber

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rs13h0gerqg15nvqchxj.png)

#### For Consumer

**Describe the stream**

**`aws kinesis describe-stream --stream-name DemoStream`**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwg6t0sfj4nrn5bb1b77.png)

**Consume some data**

**`aws kinesis get-shard-iterator --stream-name DemoStream --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON`**
**`aws kinesis get-records --shard-iterator`**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hiwrvquhlxnl60k2zbtw.png)
Doodle Army 2: Mini Militia Old Version Download for Android (All Versions)
Tags: webdev, programming, react, devops
Published: 2023-12-04 07:23:33

Hello, friends welcome to our website, as you all know we always bring amazing and extraordinary applications for you. So today I brought the Mini Militia Old Version, for you. Here in this article, I will tell you all about the Mini Militia Old Version as well and I also provide you with the downloading link to the Mini Militia Old Version. The Avatars, graphics, music, and option for creating private rooms all are best.

Today we will talk about the Mini Militia Old Version 2015 Unlimited Bullets game, it has been a very popular game since it was released. Most of the people played it in childhood with their friends. It is a very popular game and 35 lakh+ people played it in 2016 but now its popularity has decreased because there are lots of other games that have also been launched and they are much heavier and more interesting game as compared to this game, Such as free fire, PUBG, Candy crush, etc.

## What is the Mini Militia Old Version?

The main focus of Mini Militia – Doodle Army 2 is fierce multiplayer warfare means combat! This enjoyable 2D cartoon-themed hybrid between Soldat and Halo, which was inspired by the original stickman shooter, Doodle Army, lets you battle with up to 6 other players online, as well you can also play it offline on your device.

In this game, you can play a mini militia game with and against your friends even on your PC as well as on your iPhone also. This game is just like the army fighting games and here you have to fight with the other army with the help of your gun.

## Offline Mode

Mini Militia APK Download 2018 is also available offline for all users. Sometimes when you go for a picnic in a hilly area or in any rural area where there is too bad a network you are unable to watch any online videos or anything else. At that time everyone can feel bored, but don’t worry guys because with the help of this game if you don’t have any data pack or internet then you can also play this game on your device in the offline mode.

The only difference between the online and offline modes is here you can’t connect with your friends in the online mode. So guys now you can enjoy it too much without having any problem related to the data or internet. You can enjoy any time at any place with the help of this game.

### 100% Safe and Secure Game

Mini Militia Old Version Mod Apk Download is a 100% safe and secure application and here you can play this without getting any advertisement as you can also safely
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bnqsp90jgg6x2rhqjoc.jpg) download it from our website. It is really very safe to use and you can easily download it with just a simple click on the green color button that I provide you above our article under the table of downloading information. [Read More...](https://minimilitiaoldversion.in/)
Doodle Army 2: Mini Militia Old Version Download for Android (All Versions)
Tags: webdev, programming, tutorial, python
Published: 2023-12-04 07:23:06

Hello, friends welcome to our website, as you all know we always bring amazing and extraordinary applications for you. So today I brought the [Mini Militia Old Version](https://minimilitiaoldversion.in/), for you. Here in this article, I will tell you all about the Mini Militia Old Version as well and I also provide you with the downloading link to the Mini Militia Old Version. The Avatars, graphics, music, and option for creating private rooms all are best.

Today we will talk about the Mini Militia Old Version 2015 Unlimited Bullets game, it has been a very popular game since it was released. Most of the people played it in childhood with their friends. It is a very popular game and 35 lakh+ people played it in 2016 but now its popularity has decreased because there are lots of other games that have also been launched and they are much heavier and more interesting game as compared to this game, Such as free fire, PUBG, Candy crush, etc. [Read More...](https://minimilitiaoldversion.in/)
The architectural patterns I am using to better organize my Jetpack Compose code
Tags: android, kotlin, mobil, tristan
Published: 2023-12-04 07:22:16

### Table of contents
1. [The problem I have](#intro)
2. [Parts](#parts)
3. [Builder](#builder)
4. [Implementations](#impl)
5. [Bonus documentation](#doc)
6. [Reworking old code (updated:2023-12-05)](#re)
6. [Making the API cleaner (updated:2023-12-06)](#clean)

### My app on the Google play store
- [The app](https://play.google.com/store/apps/details?id=elliott.software.clicker)

## 2024-04-03 UPDATE
- I have deleted this article because I recently discovered the method described in this article causes too many unnecessary recompositions when passing functions.
- Please refer to [THIS](https://dev.to/theplebdev/organizing-large-jetpack-compose-code-bases-gi4) article if you are looking for useful architecture advice
React Native & Ionic Framework Comparison
Tags: ionic, ionicframework, react, reactnative
Published: 2023-12-04 07:11:46


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2r1222662r1pme52g0y5.png)
**Ionic Framework and React Native are both popular frameworks for building mobile applications, but they have different approaches and use different technologies. Here's a comparison of the two**:

Language:

Ionic Framework: Uses web technologies like HTML, CSS, and JavaScript/TypeScript. It relies on Angular, React, or Vue for building the user interface.

React Native: Uses JavaScript and React for building the app. React Native allows you to write native modules in Swift, Objective-C, Java, or Kotlin if needed.

Performance:

Ionic Framework: Generally, the performance may not be as high as React Native because it runs in a WebView, which is essentially a web page embedded in a native app.
React Native: Closer to native performance as it compiles to native code and runs directly on the device. React Native also allows the use of native modules for computationally intensive tasks.

UI Components:

Ionic Framework: Provides a set of pre-designed UI components that look and feel like native mobile components. It follows a web-based UI approach.
React Native: Uses native components, giving a more native look and feel to the application. React Native also has a rich ecosystem of third-party libraries for additional components.

Development Environment:

Ionic Framework: Can be developed using any text editor and a browser. It's not dependent on any specific IDE.
React Native: Requires the use of a specific IDE or text editor along with additional tools like Node.js and the React Native CLI.

Community and Ecosystem:

Ionic Framework: Has a strong community and a good number of plugins available, but it might not be as extensive as React Native.
React Native: Has a large and active community with a vast ecosystem of third-party libraries and plugins. This makes it easier to find solutions to common problems.

Learning Curve:

Ionic Framework: Might be easier to learn for web developers since it uses web technologies.
React Native: May have a steeper learning curve, especially for those new to React, but it offers more flexibility and control over the app.

Integration with Native Features:

Ionic Framework: Provides a limited set of APIs to access native features. For advanced native functionalities, Cordova plugins may be required.
React Native: Allows direct access to native APIs, and if a specific native module is not available, you can write your own in the native language.

Platform Support:

Ionic Framework: Supports both iOS and Android, as well as progressive web apps.
React Native: Supports iOS and Android, and with additional efforts, it's possible to use React Native for Windows and macOS applications.

Ultimately, the choice between Ionic Framework and React Native depends on the specific requirements of your project, the skill set of your development team, and your preferences in terms of performance and user experience.
[Digest] Java, Kotlin, Spring, Cloud, and More - Episode 17
Tags: digest, java, spring, cloud
Published: 2023-12-04 07:10:58

🌱 [Dynamic Entity Graphs in Spring Data JPA](https://jpa-buddy.com/blog/dynamic-entity-graphs-in-spring-data-jpa/): an example of Entity Graph  JPA specification usage in Spring Data JPA.

🏃 [The Joel Test: 12 Steps to Better Code](https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/): a test on how good a dev team is. The article is 23 years old, but still, it's interesting to read.

✉️ [A beginner’s guide to CDC (Change Data Capture)](https://vladmihalcea.com/a-beginners-guide-to-cdc-change-data-capture/): a small post on how [Debezium](http://debezium.io/) is used to send database changes to Kafka.

⚙️ [ClickHouse Keeper: A ZooKeeper alternative written in C\+\+](https://clickhouse.com/blog/clickhouse-keeper-a-zookeeper-alternative-written-in-cpp): which problems does ZooKeeper have and why ClickHouse uses its own Keeper. Numbers and charts are there as well.

🧩 [The Power of BFF in the Microservices World](https://medium.com/@orcunyilmazoy/the-power-of-bff-in-the-microservices-world-673c3ed3ab64): a small intro into backend-for-frontend pattern.

---

*Dream your code, code your dream.*
#2 HALAMAN PERTAMA (html series)
Tags: webdev, beginners, programming, tutorial
Published: 2023-12-04 07:01:10


![Tulisan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ibargqrf8l17aelx7cyx.jpg)
di tulisan [sebelumnya](https://dev.to/muhammadiqbalid83/1-pengenalan-html-series-67j) kita telah mengetahui html sebagai berikut:


![html](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvw79528yn5up2env708.png)

code di atas merupakan contoh dari html tetapi itu belum lengkap karena belum memenuhi semua kita butuhkan.

maksud kamu bal?

Insya Allah ini versi yang lengkapnya(butuh)

![html lengkap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vo0k9nhg2lupqn7ts9gd.png)

element sebelumnya yang kita lihat itu, sudah dibungkus didalam body.

sedangkan yang ini adalah versi utuhnya.

---
`<!DOCTYPE html>` memberitahu browser bahwa dokumen ini menggunakan html5.

`<html>` adalah root element pada halaman html.

`<head>` berisi informasi meta tentang halaman html.

`<body>` mendefinisikan dokumen body dan sebuah wadah yang berisi
element html yang bisa ditampilkan seperti headings, paragraphs, images, hyperlinks, tables, lists, etc.
Wrong Methods vs Good Methods in javascript
Tags: webdev, javascript, programming, beginners
Published: 2023-12-04 07:00:00

In JavaScript, there are multiple ways to approach solving a problem or writing code. Some methods might be considered "wrong" because they are inefficient, prone to errors, or not following best practices. On the other hand, "good" methods are typically efficient, clear, and follow best practices. Here are examples of both:

**Wrong Methods:**

- Using global variables excessively:

```
// Wrong method using global variables
var a = 5;

function multiplyByTwo() {
    result = a * 2; // using an undeclared global variable
    return result;
}

console.log(multiplyByTwo()); // 10
console.log(result); // 10 (modifying global scope)
```

This code creates a global variable result unintentionally, which can lead to unexpected behavior and bugs.

- Manipulating the DOM excessively:

```
// Wrong method of repeatedly accessing the DOM
for (let i = 0; i < 1000; i++) {
    document.getElementById('myElement').innerHTML += '<span>' + i + '</span>';
}
```

In this case, accessing the DOM in a loop can be inefficient and cause performance issues, especially when updating elements frequently.

- Not using proper error handling:

```
// Wrong method without proper error handling
function divide(a, b) {
    return a / b;
}

let result = divide(10, 0); // No handling of division by zero

console.log(result); // Infinity
```

This code does not handle the case where the divisor is zero, leading to unexpected behavior like returning Infinity instead of properly handling the error.

**Good Methods:**

- Using let/const instead of var:

```
// Good method using let/const
const a = 5;

function multiplyByTwo(number) {
    const result = number * 2; // using const to declare local variable
    return result;
}

console.log(multiplyByTwo(a)); // 10
```

Using let and const helps avoid global scope issues and improves code readability by limiting variable scope.

- Optimizing DOM access:

```
// Good method of optimizing DOM access
const myElement = document.getElementById('myElement');
let content = '';

for (let i = 0; i < 1000; i++) {
    content += '<span>' + i + '</span>';
}

myElement.innerHTML = content;
```

This code optimizes DOM manipulation by minimizing direct access in a loop, improving performance.

- Implementing error handling:

```
// Good method with proper error handling
function divide(a, b) {
    if (b === 0) {
        throw new Error('Division by zero is not allowed');
    }
    return a / b;
}

try {
    let result = divide(10, 0);
    console.log(result); // This line won't be reached if an error occurs
} catch (error) {
    console.error(error.message); // Handling the error message
}
```

Implementing error handling ensures that potential issues are caught and dealt with gracefully, preventing unexpected outcomes.

Using the "good" methods helps in writing more efficient, maintainable, and bug-free JavaScript code.