How to start up with Socket Programming with Java

Article checklist
ATTENTION: In your PR - add the ISSUE (topic form) # that this PR corresponds to. You can do this by also adding a comment that states "This fixes #(enter your Idea Content Form #)" to link and close your Idea Content (issue) when the PR is merged.
NOTE: (Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)
If you have not already please go over our Resources Page for more tips and tricks on how to improve our overall technical writing.
Preliminary Checks - Formatting and Structure

[x] Does your article follow any of the suggested structure formats? - see example formats
[x] Is your article properly formatted in Markdown? - see Github Markdown guide
[x] Have you used the correct folder and file structure? - see Contribution Guidelines
[x] Is your article over 750 words? - Tool: Wordcounter.net
[x] Have you used our preferred heading structure? - H3 (###) and up
[x] Does your article provide enough value and detail about your topic? - Articles should be clear, accurate, and fully explained.
[x] Can your article be understood by beginners? - Assume the audience is smart but has no prior exposure to the common terminology in your article.
[x] Have you included a hero image that is 600x400 pixels and have the copyright to use it? - Tools: Pixlr Image Editor for resizing and Unsplash for Creative Commons images
[x] In your PR - add a comment that states "This fixes #(enter your Idea Content Form #)" to link and close your Idea Content (issue) when the PR is merged.

Grammar & plagiarism checks

[x] Have you spellchecked and grammar checked your article? - Tools: Write&Improve - ProWritingAid -  Grammarly
[x] Please place your article through a 3rd party plagiarism checker? We suggest using Quetext, this tool is free and has a daily limit. We typically accept articles with 10% or less.
[x] Have you checked your article for readability? - Tool: Hemmingway
[ ] Have you added sources for quotes and images that aren't yours?

Technical checks

[x] Are your code snippets properly formatted for syntax highlighting - see Syntax guide

Contribution guidelines
For first-time contributors and for more details, see Contributing Guidelines
This fixes #2338

@john-amiscaray
Will be reviewing this one 🚀

@apondi-911 Hello there, welcome to the engineering education program, I will be your peer reviewer. This is my first time reviewing an article so I apologize if I mess up somewhere and take a little too long. Also, for your first article don't worry too much about this first submission, I know for me it was a bit of a learning process. When I first started I got pretty anxious and made a lot more mistakes than I normally do but after that first article, it was smooth sailing from there.

plagiarism check done

@apondi-911 I added a bunch of suggestions that you can start looking at to polish up your work even more, although I'm not sure I'm quite done yet so give me a bit of time and I'll tell you when I'm done with the preliminary review. Though so far, there seems to be a good amount of value in what you're sharing it's just there are quite a few places I would polish up a bit. Don't panic though see all these suggestions at once, I'm just trying to help you make this as perfect as possible.

@apondi-911 I had a look at your article after you made that commit earlier, and I think I have the preliminary review just about done. I just need to put my in-line comments which I will try to do as soon as possible. I have quite a few specific suggestions to help you make your article as amazing as possible. Although I also have a few general tips I'd like to share with you for next time to improve your writing and speed up future revision. For starters, you could try to limit your use of passive voice some more. While it wasn't a major problem, there were some places in your article where it made your writing less clear which I had to fix (don't worry I made that mistake much more in my first article 😄). Also, before submitting your article or committing changes, always makes sure to check it with Grammarly and Hemmingway. There were a few mistakes I caught that should have been easily fixed with a quick Grammarly check (also just in case: make sure your Grammarly is using American English). Finally, there were some sentences where the transition from the previous sentence was awkward. You can try fixing this by adding transition words or phrases at the start of the sentence (ex. moreover, hence, in case you didn't know, additionally, etc.). But overall, nice work. 👏

Thank you
On Sat, Jul 10, 2021, 20:33 john-amiscaray @.***> wrote:

@apondi-911 https://github.com/apondi-911 I had a look at your article
after you made that commit earlier, and I think I have the preliminary
review just about done. I just need to put my in-line comments which I will
try to do as soon as possible. I have quite a few specific suggestions to
help you make your article as amazing as possible. Although I also have a
few general tips I'd like to share with you for next time to improve your
writing and speed up future revision. For starters, you could try to
limit your use of passive voice
https://www.hamilton.edu/academics/centers/writing/seven-sins-of-writing/1
some more. While it wasn't a major problem, there were some places in your
article where it made your writing less clear which I had to fix (don't
worry I made that mistake much more in my first article 😄). Also, before
submitting your article or committing changes, always makes sure to check
it with Grammarly https://app.grammarly.com and Hemmingway
https://hemingwayapp.com/. There were a few mistakes I caught that
should have been easily fixed with a quick Grammarly check (also just in
case: make sure your Grammarly is using American English). Finally, there
were some sentences where the transition from the previous sentence was
awkward. You can try fixing this by adding transition words or phrases at
the start of the sentence (ex. moreover, hence, in case you didn't know,
additionally, etc.). But overall, nice work. 👏
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-877673823,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXB3ZNYVRCPYET4HOGTTXB757ANCNFSM4724PH6A
.

@apondi-911 I added those suggestions I was mentioning yesterday so you can start implementing those changes. I mentioned a few times that you could avoid some of the formatting issues if you checked your markdown using a markdown viewer. Here is one you can use in case you don't know but I'm sure a bunch of IDEs have a markdown viewer built-in or in plugins (like VS Code or WebStorm) that you could use.

@apondi-911
Just wanted to get a status update on this PR?

Hello hector am correcting errors that were found will send tomorrow
On Jul 15, 2021 19:49, "hectorkambow" @.***> wrote:
@apondi-911 https://github.com/apondi-911
Just wanted to get a status update on this PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-880857079,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXFUKZA3J7CEFO42M3DTX4GQLANCNFSM4724PH6A
.

@apondi-911 Please check your writing using Grammarly editor before we continue. I just did a quick Grammarly check on your recent commit and noticed a lot of small mistakes that could be fixed using Grammarly. It would make this editing process a lot faster if you'd use it so we can get those small errors out of the way. I already mentioned earlier that you should check your writing with Grammarly before committing in case you missed it. Also, if you need further help, don't be afraid to ask me questions, that's what I'm here for.

@apondi-911 I'm going through your recent commit right now and I'm getting the sense that you may not be understanding why I'm making some of the corrections I'm making. I'm sorry if I'm not being clear enough or I just missed some errors. While there is certainly a significant improvement, you are making some of the same types of mistakes you have been making before. In an effort to help you as best as I can for this article and the future, I'm willing to answer any questions you have as soon as I can. Don't be afraid to do so; believe me, I'm trying my very best to make this article perfect and help you as best as I can. Feel free to message me on Slack to ask me questions as you implement the changes I will try to post today. To best go through this process, I highly recommend you ask me questions while you try to polish your article, before you commit. Please do this since I thoroughly believe this is best for the quality of this article and will help you in the future. I'm sorry this revision is taking a while but the grammar and formatting are still not up to standard.

Am really trying to deliver what you require from me. It's like you are not
satisfied...I passed my article through grammarly and the changes on
passive voice,,I didn't correct it because I thought it will change some
meaning
On Sat, Jul 17, 2021, 19:28 john-amiscaray @.***> wrote:

@apondi-911 https://github.com/apondi-911 I'm going through your recent
commit right now and I'm getting the sense that you may not be
understanding why I'm making some of the corrections I'm making. I'm sorry
if I'm not being clear enough or I just missed some errors. While there is
certainly a significant improvement, you are making some of the same types
of mistakes you have been making before. In an effort to help you as best
as I can for this article and the future, I'm willing to answer any
questions you have as soon as I can. Don't be afraid to do so; believe me,
I'm trying my very best to make this article perfect and help you as best
as I can. Feel free to message me on Slack to ask me questions as you
implement the changes I will try to post today. To best go through this
process, I highly recommend you ask me questions while you try to
polish your article, before you commit. Please do this since I
thoroughly believe this is best for the quality of this article and will
help you in the future. I'm sorry this revision is taking a while but the
grammar and formatting are still not up to standard.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-881922849,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXATT3ZN2S7Z6WS45LLTYGVTFANCNFSM4724PH6A
.

Am really trying to deliver what you require from me. It's like you are not satisfied...I passed my article through Grammarly and the changes on passive voice, I didn't correct it because I thought it will change some meaning
…
On Sat, Jul 17, 2021, 19:28 john-amiscaray @.***> wrote: @apondi-911 https://github.com/apondi-911 I'm going through your recent commit right now and I'm getting the sense that you may not be understanding why I'm making some of the corrections I'm making. I'm sorry if I'm not being clear enough or I just missed some errors. While there is certainly a significant improvement, you are making some of the same types of mistakes you have been making before. To help you as best as I can for this article and the future, I'm willing to answer any questions you have as soon as I can. Don't be afraid to do so; believe me, I'm trying my very best to make this article perfect and help you as best as I can. Feel free to message me on Slack to ask me questions as you implement the changes I will try to post today. To best go through this process, I highly recommend you ask me questions while you try to polish your article, before you commit. Please do this since I thoroughly believe this is best for the quality of this article and will help you in the future. I'm sorry this revision is taking a while but the grammar and formatting are still not up to standard. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2826 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7YMXATT3ZN2S7Z6WS45LLTYGVTFANCNFSM4724PH6A .

I'm sorry if I appear to be harsh to you, that is not what I'm going for here. I just feel like you are not understanding some of the corrections I'm making. This could very well be my fault and I'm just not being clear. I'm was just recommending that you ask me any questions if you have any because as I'm going through this most recent commit there are still some similar errors I saw as before. This could very well be because I just wasn't clear as to why I made the suggestions I made. I can give you some general tips later to help you best understand what I'm seeing along with the specific, line-to-line suggestions, but I have to go somewhere soon so that will have to be later today. I understand how frustrating this may be but I'm trying my best to help you and bring this up to standard and beyond.

I understand I'll correct it
On Sat, Jul 17, 2021, 19:50 john-amiscaray @.***> wrote:

Am really trying to deliver what you require from me. It's like you are
not satisfied...I passed my article through Grammarly and the changes on
passive voice, I didn't correct it because I thought it will change some
meaning
… <#m_-726943755108619943_>
On Sat, Jul 17, 2021, 19:28 john-amiscaray @.***> wrote: @apondi-911
https://github.com/apondi-911 https://github.com/apondi-911 I'm going
through your recent commit right now and I'm getting the sense that you may
not be understanding why I'm making some of the corrections I'm making. I'm
sorry if I'm not being clear enough or I just missed some errors. While
there is certainly a significant improvement, you are making some of the
same types of mistakes you have been making before. To help you as best as
I can for this article and the future, I'm willing to answer any questions
you have as soon as I can. Don't be afraid to do so; believe me, I'm trying
my very best to make this article perfect and help you as best as I can.
Feel free to message me on Slack to ask me questions as you implement the
changes I will try to post today. To best go through this process, I
highly recommend you ask me questions while you try to polish your
article, before you commit. Please do this since I thoroughly believe
this is best for the quality of this article and will help you in the
future. I'm sorry this revision is taking a while but the grammar and
formatting are still not up to standard. — You are receiving this because
you were mentioned. Reply to this email directly, view it on GitHub <#2826
(comment)
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-881922849>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXATT3ZN2S7Z6WS45LLTYGVTFANCNFSM4724PH6A
.
I'm sorry if I appear to be harsh to you, that is not what I'm going for
here. I just feel like you are not understanding some of the corrections
I'm making. This could very well be my fault and I'm just not being clear.
I'm was just recommending that you ask me any questions if you have any
because as I'm going through this most recent commit there are still some
similar errors I saw as before. This could very well be because I just
wasn't clear as to why I made the suggestions I made. I can give you some
general tips later to help you best understand what I'm seeing along with
the specific, line-to-line suggestions, but I have to go somewhere soon so
that will have to be later today. I understand how frustrating this may be
but I'm trying my best to help you and bring this up to standard and beyond.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-881925708,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXDCACOTMRCQHC6JGBTTYGYFTANCNFSM4724PH6A
.

@apondi-911 I added the in-line comments now so you can start implementing my suggestions. I realized there were significantly fewer suggestions I had to make this time so we are making more and more progress so good job! As some general tips I probably should have mentioned, there were some times where you were missing an "a" or "the" in front of a noun. For example: you should say "The server does this" instead of "Server does this". You would use "a" to talk about servers in general and "the" to talk about one particular server. Also with punctuation (i.e. periods, commas, semicolons), there were some places where you do not space them properly. With punctuation, there should not be a space before the punctuation, but there should be one after. For example: "This is a sentence. This is the next one." instead of "This is a sentence .This is the next one.". One exception to this would be with IP addresses so don't change anything there where you show the IP address. Also, there were still some markdown formatting errors I found. Make sure to use a markdown viewer as I showed you last time. I would additionally recommend you have a look at this guide on markdown syntax.

Hello John, I have passed my article through Grammarly and the issue is on
passive voice is it necessary to correct it because I feel it will change
the meaning.
This is how I feel it should be because without the brackets it will mean
different as you proposed earlier.
This
public InputStream getInputStream()
To:
public InputStream (getInputStream())
Before I commit I wanted you to clarify this for me
On Sun, Jul 18, 2021 at 3:53 AM john-amiscaray @.***>
wrote:

@apondi-911 https://github.com/apondi-911 I added the in-line comments
now so you can start implementing my suggestions. I realized there were
significantly fewer suggestions I had to make this time so we are making
more and more progress so good job! As some general tips I probably should
have mentioned, there were some times where you were missing an "a" or
"the" in front of a noun. For example: you should say "The server does
this" instead of "Server does this". You would use "a" to talk about
servers in general and "the" to talk about one particular server. Also
with punctuation (i.e. periods, commas, semicolons), there were some places
where you do not space them properly. With punctuation, there should not be
a space before the punctuation, but there should be one after. For example: "This
is a sentence. This is the next one." instead of "This is a sentence
.This is the next one.". One exception to this would be with IP
addresses so don't change anything there where you show the IP address.
Also, there were still some markdown formatting errors I found. Make sure
to use a markdown viewer as I showed you last time. I would additionally
recommend you have a look at this guide on markdown syntax
https://www.markdownguide.org/basic-syntax/.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-881980040,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXHEXHFVVQWR56MTXILTYIQYNANCNFSM4724PH6A
.

Hello John, I have passed my article through Grammarly and the issue is on passive voice is it necessary to correct it because I feel it will change the meaning. This is how I feel it should be because without the brackets it will mean different as you proposed earlier. This public InputStream getInputStream() To: public InputStream (getInputStream()) Before I commit I wanted you to clarify this for me
…
On Sun, Jul 18, 2021 at 3:53 AM john-amiscaray @.***> wrote: @apondi-911 https://github.com/apondi-911 I added the in-line comments now so you can start implementing my suggestions. I realized there were significantly fewer suggestions I had to make this time so we are making more and more progress so good job! As some general tips I probably should have mentioned, there were some times where you were missing an "a" or "the" in front of a noun. For example: you should say "The server does this" instead of "Server does this". You would use "a" to talk about servers in general and "the" to talk about one particular server. Also with punctuation (i.e. periods, commas, semicolons), there were some places where you do not space them properly. With punctuation, there should not be a space before the punctuation, but there should be one after. For example: "This is a sentence. This is the next one." instead of "This is a sentence .This is the next one.". One exception to this would be with IP addresses so don't change anything there where you show the IP address. Also, there were still some markdown formatting errors I found. Make sure to use a markdown viewer as I showed you last time. I would additionally recommend you have a look at this guide on markdown syntax https://www.markdownguide.org/basic-syntax/. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2826 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7YMXHEXHFVVQWR56MTXILTYIQYNANCNFSM4724PH6A .

Hello there, thanks for reaching out to me for help as I wanted you to do. I remember when looking through your article that there weren't too many instances of passive voice and some of them I felt were reasonable so you don't need to fix all of them. However, the ones I had a particular issue with were some places where you don't mention who does something (i.e. the noun). So for example:

If an I/O error occurs, exception handling mechanisms are implemented

Here, I don't know who implements the exception handling. It could mean the exception handling is within the ServerSocket class, or you could mean the reader will have to implement exception handling. As well, you should ideally mention the noun first before the action. So for example instead of saying: "the book was written by him", you should say: "he wrote the book". In this case, writing the book is the action, and he is the noun. This is to make sure you are concise (meaning you don't make your sentences unnecessarily complex). You don't need to change the meaning of a sentence to remove the passive voice from it, you just need to reword it. In general, to remove passive voice you mention who does the action and do so before mentioning the action.
Also, about this change you want to make:

This
public InputStream getInputStream()
To:
public InputStream (getInputStream())

The reason I prefer to have it formatted like this:

public InputStream getInputStream()

is because that is exactly how you would write out the method declaration in java in your IDE. So for instance, when you write a method, you would write it like this:
public int add(int a, int b){ // no brackets around the method name and arguments

    return a + b;

}

and not like this:
public int (add(int a, int b)){ // brackets around the method name and arguments (this wouldn't compile)

    return a + b;

}

I'm not sure why you want to format it like this:

public InputStream (getInputStream())

the way I suggested looks more natural to me since it is like how you'd type it out in java. Please clarify to me why you want to format it like this:

public InputStream (getInputStream())

because I don't understand what it is that makes you want to format it that way.

@apondi-911 By the way, just as a reminder, please check your article in a markdown viewer before committing. This is to ensure that the article is formated as intended and the links work.

@apondi-911 I had a look at your most recent commit and I must say I am very impressed by how much you've improved the article since we started, amazing job! I only have a handful of suggestions to give to you (not many, most are minor so don't worry). I'm pretty confident we could get to the technical review soon (which I don't think should take too long) and then get this published.

Thank you for your mentorship and your corrections. Is that the only one I
should correct or I should wait for more?
On Tue, Jul 20, 2021, 20:09 john-amiscaray @.***> wrote:

@.**** commented on this pull request.
In
content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md
https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r673316468
:

Introduction

-Socket programming is a way of connecting two computers over a network to allow the exchange of information.The connection can be through connection-oriented protocol or connectionless. In our case, we will be using  TCP/IP a connection-oriented protocol.
-In connection-oriented protocols, two computers must establish a connection before transferring data. Whereas in connectionless, you do not need every packet to arrive at its desired destination. This is made possible by UDP(User Datagram Protocol)
-We will be using the Client\Server architecture to illustrate more on sockets. Client and server communicate by writing to and reading from the socket connection. To establish this connection, the machines must have each other's network information.
+
+Socket programming is a means of communicating data between two computers across a network. Connections can be made using either a connection-oriented protocol or a connectionless protocol. TCP/IP, a connection-oriented protocol, will be used in our case.
+
+Before exchanging data, two computers must establish a link in connection-oriented protocols. In contrast, you don't require every packet to arrive at its intended destination for connectionless. It is made feasible via UDP (User Datagram Protocol). To demonstrate sockets further, we shall use the Client\Server architecture. Client and server communicate by writing to and reading from the socket connection. The machines must have each other's network information to make this connection.
+
Table of contents:
Table of contents:
Make this a header like so:
Table of contents:
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#pullrequestreview-710871740,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXDMIUK4ZX4DMRAKEXDTYWUVPANCNFSM4724PH6A
.

Thank you for your mentorship and your corrections. Is that the only one I should correct or I should wait for more?
…
On Tue, Jul 20, 2021, 20:09 john-amiscaray @.> wrote: @.* commented on this pull request. ------------------------------ In content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md <#2826 (comment)> : > ### Introduction -Socket programming is a way of connecting two computers over a network to allow the exchange of information.The connection can be through connection-oriented protocol or connectionless. In our case, we will be using TCP/IP a connection-oriented protocol. -In connection-oriented protocols, two computers must establish a connection before transferring data. Whereas in connectionless, you do not need every packet to arrive at its desired destination. This is made possible by UDP(User Datagram Protocol) -We will be using the Client\Server architecture to illustrate more on sockets. Client and server communicate by writing to and reading from the socket connection. To establish this connection, the machines must have each other's network information. + +Socket programming is a means of communicating data between two computers across a network. Connections can be made using either a connection-oriented protocol or a connectionless protocol. TCP/IP, a connection-oriented protocol, will be used in our case. + +Before exchanging data, two computers must establish a link in connection-oriented protocols. In contrast, you don't require every packet to arrive at its intended destination for connectionless. It is made feasible via UDP (User Datagram Protocol). To demonstrate sockets further, we shall use the Client\Server architecture. Client and server communicate by writing to and reading from the socket connection. The machines must have each other's network information to make this connection. + Table of contents: Table of contents: Make this a header like so: ### Table of contents: — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2826 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7YMXDMIUK4ZX4DMRAKEXDTYWUVPANCNFSM4724PH6A .

I believe I put all the corrections I wanted to make. Let me know if you have any questions or concerns with them. If I missed something then I will try to post them as soon as possible.

@apondi-911 I believe those should be all of the suggestions. It may seem like a lot but most of them are super small (like just adding a :) so don't worry it really isn't much. Believe me, your article has gotten way better it's just some very small things that needed to be fixed.

@apondi-911 I left only a few more suggestions, but I also noticed you left out some suggestions from my last review so please add those too. Great work once again, I mostly posted minor suggestions and a lot less.

@apondi-911 please implement the changes I suggested just now along with the ones from previous reviews so we can move on to the technical review. Let me know if you can't find the suggestions from previous reviews I'm talking about and if you need me to clarify.

Grammarly is showing an error when  I put a space in between e.g. 21
On Wed, Jul 21, 2021, 20:37 john-amiscaray @.***> wrote:

@.**** commented on this pull request.
In
content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md
https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r674196243
:

->The ports 0-1024 are for administrative use only (e,g 21 for FTP,23 for Telnet,25 for email, and 80 for HTTP). In our program, we'll be using port number 5000.
+>The ports 0-1024 are for administrative use only (e.g. 21 for FTP,23 for Telnet, 25 for email, and 80 for HTTP). In our program, we'll be using port number 5000.
FTP,23 for Telnet,
add a space before the 23:
FTP, 23 for Telnet,
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#pullrequestreview-711973412,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXHOG24GBVGIRHY2JF3TY4AWHANCNFSM4724PH6A
.

Grammarly is showing an error when I put a space in between e.g. 21
…
On Wed, Jul 21, 2021, 20:37 john-amiscaray @.> wrote: @.* commented on this pull request. ------------------------------ In content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md <#2826 (comment)> : > ->The ports 0-1024 are for administrative use only (e,g 21 for FTP,23 for Telnet,25 for email, and 80 for HTTP). In our program, we'll be using port number 5000. +>The ports 0-1024 are for administrative use only (e.g. 21 for FTP,23 for Telnet, 25 for email, and 80 for HTTP). In our program, we'll be using port number 5000. FTP,23 for Telnet, add a space before the 23: FTP, 23 for Telnet, — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2826 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7YMXHOG24GBVGIRHY2JF3TY4AWHANCNFSM4724PH6A .

I tried putting it into Grammarly, I think the issue is you also need to put a comma after it too like this:

e.g., 21

After doing that the error is gone. I found something here that shows examples of the use of e.g. and they put a comma and a space after before listing the examples. I honestly didn't know there should be a comma there so thanks for bringing this to my attention.

That's a minor issue on my side it's tiring to correct then you will still
bring out another mistake, am not having hopes
On Thu, Jul 22, 2021, 17:16 john-amiscaray @.***> wrote:

Grammarly is showing an error when I put a space in between e.g. 21
… <#m_8132795430982598547_>
On Wed, Jul 21, 2021, 20:37 john-amiscaray @.*> wrote: @.** commented
on this pull request. ------------------------------ In
content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md
<#2826 (comment)
https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r674196243>
: > ->The ports 0-1024 are for administrative use only (e,g 21 for FTP,23
for Telnet,25 for email, and 80 for HTTP). In our program, we'll be using
port number 5000. +>The ports 0-1024 are for administrative use only (e.g.
21 for FTP,23 for Telnet, 25 for email, and 80 for HTTP). In our program,
we'll be using port number 5000. FTP,23 for Telnet, add a space before the
23: FTP, 23 for Telnet, — You are receiving this because you were
mentioned. Reply to this email directly, view it on GitHub <#2826 (review)
https://github.com/section-engineering-education/engineering-education/pull/2826#pullrequestreview-711973412>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXHOG24GBVGIRHY2JF3TY4AWHANCNFSM4724PH6A
.
I tried putting it into Grammarly, I think the issue is you also need to
put a comma after it too like this:
e.g., 21
After doing that the error is gone. I found something here
https://www.aje.com/arc/editing-tip-using-eg-and-ie/ that shows
examples of the use of e.g. and they put a comma and a space after
before listing the examples. I honestly didn't know there should be a comma
there so thanks for bringing this to my attention.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-884948541,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXASQKEE6ADQW5NW5OTTZAR2VANCNFSM4724PH6A
.

That's a minor issue on my side it's tiring to correct then you will still bring out another mistake, am not having hopes
…
On Thu, Jul 22, 2021, 17:16 john-amiscaray @.> wrote: Grammarly is showing an error when I put a space in between e.g. 21 … <#m_8132795430982598547_> On Wed, Jul 21, 2021, 20:37 john-amiscaray @.> wrote: @. commented on this pull request. ------------------------------ In content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md <#2826 (comment) <#2826 (comment)>> : > ->The ports 0-1024 are for administrative use only (e,g 21 for FTP,23 for Telnet,25 for email, and 80 for HTTP). In our program, we'll be using port number 5000. +>The ports 0-1024 are for administrative use only (e.g. 21 for FTP,23 for Telnet, 25 for email, and 80 for HTTP). In our program, we'll be using port number 5000. FTP,23 for Telnet, add a space before the 23: FTP, 23 for Telnet, — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2826 (review) <#2826 (review)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7YMXHOG24GBVGIRHY2JF3TY4AWHANCNFSM4724PH6A . I tried putting it into Grammarly, I think the issue is you also need to put a comma after it too like this: e.g., 21 After doing that the error is gone. I found something here https://www.aje.com/arc/editing-tip-using-eg-and-ie/ that shows examples of the use of e.g. and they put a comma and a space after before listing the examples. I honestly didn't know there should be a comma there so thanks for bringing this to my attention. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2826 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT7YMXASQKEE6ADQW5NW5OTTZAR2VANCNFSM4724PH6A .

It's mostly minor things we need to fix at this point, trust me I really do believe we can get this polished enough to be published. I feel like you've learned a lot from this so at least next time it will be faster. I went through something similar with my first article where I was making a lot of mistakes that I kept having to fix and it was discouraging but after the first article got published, I learned enough where all my future articles didn't take long at all to be published. Believe me, this is tiring for me too but I can't feel good leaving the issues I'm seeing and with you not publishing the very best you can do. Don't get me wrong though, I really believe you have improved this a lot since we started, I was genuinely impressed by how much you fixed in one of the commits and how your writing improved. Some of this may have even been my fault, maybe I've just been missing some things in some of my reviews and that's why it looks like I'm adding more suggestions out of nowhere for you to fix.

Thank you for your mentorship and patience, honestly from the time I begun
writing to now there's a huge difference
On Thu, Jul 22, 2021, 17:29 john-amiscaray @.***> wrote:

That's a minor issue on my side it's tiring to correct then you will still
bring out another mistake, am not having hopes
… <#m_6850424944495830006_>
On Thu, Jul 22, 2021, 17:16 john-amiscaray @.> wrote: Grammarly is
showing an error when I put a space in between e.g. 21 …
<#m_8132795430982598547_> On Wed, Jul 21, 2021, 20:37 john-amiscaray @.>
wrote: @. commented on this pull request. ------------------------------
In
content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md
<#2826
https://github.com/section-engineering-education/engineering-education/pull/2826
(comment) <#2826 (comment)
https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r674196243>>
: > ->The ports 0-1024 are for administrative use only (e,g 21 for FTP,23
for Telnet,25 for email, and 80 for HTTP). In our program, we'll be using
port number 5000. +>The ports 0-1024 are for administrative use only (e.g.
21 for FTP,23 for Telnet, 25 for email, and 80 for HTTP). In our program,
we'll be using port number 5000. FTP,23 for Telnet, add a space before the
23: FTP, 23 for Telnet, — You are receiving this because you were
mentioned. Reply to this email directly, view it on GitHub <#2826
https://github.com/section-engineering-education/engineering-education/pull/2826
(review) <#2826 (review)
https://github.com/section-engineering-education/engineering-education/pull/2826#pullrequestreview-711973412>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXHOG24GBVGIRHY2JF3TY4AWHANCNFSM4724PH6A
. I tried putting it into Grammarly, I think the issue is you also need to
put a comma after it too like this: e.g., 21 After doing that the error is
gone. I found something here
https://www.aje.com/arc/editing-tip-using-eg-and-ie/ that shows examples
of the use of e.g. and they put a comma and a space after before
listing the examples. I honestly didn't know there should be a comma there
so thanks for bringing this to my attention. — You are receiving this
because you were mentioned. Reply to this email directly, view it on GitHub
<#2826 (comment)
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-884948541>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXASQKEE6ADQW5NW5OTTZAR2VANCNFSM4724PH6A
.
It's mostly minor things we need to fix at this point, trust me I really
do believe we can get this polished enough to be published. I feel like
you've learned a lot from this so at least next time it will be faster. I
went through something similar with my first article where I was making a
lot of mistakes that I kept having to fix and it was discouraging but after
the first article got published, I learned enough where all my future
articles didn't take long at all to be published. Believe me, this is
tiring for me too but I can't feel good leaving the issues I'm seeing and
with you not publishing the very best you can do. Don't get me wrong
though, I really believe you have improved this a lot since we started, I
was genuinely impressed by how much you fixed in one of the commits and how
your writing improved. Some of this may have even been my fault, maybe I've
just been missing some things in some of my reviews and that's why it looks
like I'm adding more suggestions out of nowhere for you to fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-884959116,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXAHOLIWAIG6ZSQN2ZLTZATOHANCNFSM4724PH6A
.

So, should I wait for more corrections or so far so good?
On Thu, Jul 22, 2021, 17:35 Ashley Apondi @.***> wrote:

Thank you for your mentorship and patience, honestly from the time I begun
writing to now there's a huge difference
On Thu, Jul 22, 2021, 17:29 john-amiscaray @.***>
wrote:

That's a minor issue on my side it's tiring to correct then you will
still bring out another mistake, am not having hopes
… <#m_-918377156888040120_m_6850424944495830006_>
On Thu, Jul 22, 2021, 17:16 john-amiscaray @.> wrote: Grammarly is
showing an error when I put a space in between e.g. 21 …
<#m_8132795430982598547_> On Wed, Jul 21, 2021, 20:37 john-amiscaray @.>
wrote: @. commented on this pull request.
------------------------------ In
content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md
<#2826
https://github.com/section-engineering-education/engineering-education/pull/2826
(comment) <#2826 (comment)
https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r674196243>>
: > ->The ports 0-1024 are for administrative use only (e,g 21 for FTP,23
for Telnet,25 for email, and 80 for HTTP). In our program, we'll be using
port number 5000. +>The ports 0-1024 are for administrative use only (e.g.
21 for FTP,23 for Telnet, 25 for email, and 80 for HTTP). In our program,
we'll be using port number 5000. FTP,23 for Telnet, add a space before the
23: FTP, 23 for Telnet, — You are receiving this because you were
mentioned. Reply to this email directly, view it on GitHub <#2826
https://github.com/section-engineering-education/engineering-education/pull/2826
(review) <#2826 (review)
https://github.com/section-engineering-education/engineering-education/pull/2826#pullrequestreview-711973412>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXHOG24GBVGIRHY2JF3TY4AWHANCNFSM4724PH6A
. I tried putting it into Grammarly, I think the issue is you also need to
put a comma after it too like this: e.g., 21 After doing that the error is
gone. I found something here
https://www.aje.com/arc/editing-tip-using-eg-and-ie/ that shows examples
of the use of e.g. and they put a comma and a space after before
listing the examples. I honestly didn't know there should be a comma there
so thanks for bringing this to my attention. — You are receiving this
because you were mentioned. Reply to this email directly, view it on GitHub
<#2826 (comment)
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-884948541>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXASQKEE6ADQW5NW5OTTZAR2VANCNFSM4724PH6A
.
It's mostly minor things we need to fix at this point, trust me I really
do believe we can get this polished enough to be published. I feel like
you've learned a lot from this so at least next time it will be faster. I
went through something similar with my first article where I was making a
lot of mistakes that I kept having to fix and it was discouraging but after
the first article got published, I learned enough where all my future
articles didn't take long at all to be published. Believe me, this is
tiring for me too but I can't feel good leaving the issues I'm seeing and
with you not publishing the very best you can do. Don't get me wrong
though, I really believe you have improved this a lot since we started, I
was genuinely impressed by how much you fixed in one of the commits and how
your writing improved. Some of this may have even been my fault, maybe I've
just been missing some things in some of my reviews and that's why it looks
like I'm adding more suggestions out of nowhere for you to fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-884959116,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXAHOLIWAIG6ZSQN2ZLTZATOHANCNFSM4724PH6A
.

So, should I wait for more corrections or so far so good?
…
On Thu, Jul 22, 2021, 17:35 Ashley Apondi @.> wrote: Thank you for your mentorship and patience, honestly from the time I begun writing to now there's a huge difference On Thu, Jul 22, 2021, 17:29 john-amiscaray @.> wrote: > That's a minor issue on my side it's tiring to correct then you will > still bring out another mistake, am not having hopes > … <#m_-918377156888040120_m_6850424944495830006_> > On Thu, Jul 22, 2021, 17:16 john-amiscaray @.> wrote: Grammarly is > showing an error when I put a space in between e.g. 21 … > <#m_8132795430982598547_> On Wed, Jul 21, 2021, 20:37 john-amiscaray @.> > wrote: @. commented on this pull request. > ------------------------------ In > content/articles/How-to-start-up-with-Socket-Programming-with-Java/index.md > <#2826 > <#2826> > (comment) <#2826 (comment) > <#2826 (comment)>>> > : > ->The ports 0-1024 are for administrative use only (e,g 21 for FTP,23 > for Telnet,25 for email, and 80 for HTTP). In our program, we'll be using > port number 5000. +>The ports 0-1024 are for administrative use only (e.g. > 21 for FTP,23 for Telnet, 25 for email, and 80 for HTTP). In our program, > we'll be using port number 5000. FTP,23 for Telnet, add a space before the > 23: FTP, 23 for Telnet, — You are receiving this because you were > mentioned. Reply to this email directly, view it on GitHub <#2826 > <#2826> > (review) <#2826 (review) > <#2826 (review)>>>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AT7YMXHOG24GBVGIRHY2JF3TY4AWHANCNFSM4724PH6A > . I tried putting it into Grammarly, I think the issue is you also need to > put a comma after it too like this: e.g., 21 After doing that the error is > gone. I found something here > https://www.aje.com/arc/editing-tip-using-eg-and-ie/ that shows examples > of the use of e.g. and they put a comma and a space after before > listing the examples. I honestly didn't know there should be a comma there > so thanks for bringing this to my attention. — You are receiving this > because you were mentioned. Reply to this email directly, view it on GitHub > <#2826 (comment) > <#2826 (comment)>>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AT7YMXASQKEE6ADQW5NW5OTTZAR2VANCNFSM4724PH6A > . > > It's mostly minor things we need to fix at this point, trust me I really > do believe we can get this polished enough to be published. I feel like > you've learned a lot from this so at least next time it will be faster. I > went through something similar with my first article where I was making a > lot of mistakes that I kept having to fix and it was discouraging but after > the first article got published, I learned enough where all my future > articles didn't take long at all to be published. Believe me, this is > tiring for me too but I can't feel good leaving the issues I'm seeing and > with you not publishing the very best you can do. Don't get me wrong > though, I really believe you have improved this a lot since we started, I > was genuinely impressed by how much you fixed in one of the commits and how > your writing improved. Some of this may have even been my fault, maybe I've > just been missing some things in some of my reviews and that's why it looks > like I'm adding more suggestions out of nowhere for you to fix. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <#2826 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AT7YMXAHOLIWAIG6ZSQN2ZLTZATOHANCNFSM4724PH6A > . >

I haven't gotten to look at it fully yet. I'll probably be able to in a few hours from now or so

@apondi-911 I'm happy to say that those three suggestions I put just now are all the suggestions I have for you after your recent commit, aside from a few suggestions over the past couple of days that it seems you may have missed, and the one I gave this morning (I think you may be in a different time zone than me but it's the afternoon where I am). Great work! See, I told you you don't need to worry. In case you don't know what I'm talking about when I said:

a few suggestions over the past couple of days that it seems you may have missed

here are the mistakes I'm talking about (in case you can't see those suggestions anymore for whatever reason):
Change:

System. in specifies that we are getting the keyboard input.

To:

System.in specifies that we are getting the keyboard input.

Removing the space between System. and in since that is how it should be in actual code. I know Grammarly marks that as a mistake but it doesn't understand we are in the context of programming so ignore Grammarly in this case.

Change:

Make sure the ports are the same other than that, the connection will fail.

To:

Make sure the ports are the same otherwise, the connection will fail.

otherwise sounds like a more precise and clear choice of words here than other than that.
So overall, you just have 6 suggestions from me to implement before we can move on (all of which are small you can probably do it right now in about 5 minutes).

@apondi-911 Still a couple of suggestions that you forgot to cover in that most recent commit, mainly the recently in-line comments I put not long ago. Please make sure you look through what I said carefully because it seems like you missed those. Also, there is one other suggestion I forgot to mention (I'm sorry about that one) but it's also super small:
Change:

Then, in the client window, type messages. Example

To:

Then, in the client window, type messages. Example:

Just add the colon (:) at the end after Example.

@apondi-911 it seems you may not see what I was trying to say. There are three other suggestions I had other than the ones you fixed just now. They can be found here:

https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r675025668
https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r675013066
https://github.com/section-engineering-education/engineering-education/pull/2826#discussion_r675012485

Other than that, we should be good to move on. Let me know if you still need clarification.

@apondi-911 I'm a little bit confused because it seems you reverted something from the previous commit in your most recent commit. See this suggestion I had:

Change:

Then, in the client window, type messages. Example

To:

Then, in the client window, type messages. Example:

Just add the colon (:) at the end after Example.

You seemed to have removed the colon after adding it one commit ago. Is there a reason for this? Please implement this again or let me know otherwise. After that, I can do the technical review

@ahmadmardeni1 We should be ready for the technical review now.

Sorry about that twas a slight mistake
On Thu, Jul 22, 2021, 21:44 john-amiscaray @.***> wrote:

@apondi-911 https://github.com/apondi-911 I'm a little bit confused
because it seems you reverted something from the previous commit in your
most recent commit. See this suggestion I had:
Change:
Then, in the client window, type messages. Example
To:
Then, in the client window, type messages. Example:
Just add the colon (:) at the end after Example.
You seemed to have removed the colon after adding it one commit ago. Is
there a reason for this? Please implement this again or let me know
otherwise. After that, I can do the technical review
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-885149132,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXCO4QCOKFFEGWPSZN3TZBRKLANCNFSM4724PH6A
.

@apondi-911 I'm starting on the technical review right now. This involves me checking if your code works, suggesting any ways to improve your code (if needed), and looking for any technical inaccuracies in your explanations.

@apondi-911 I finished going through it. The code works perfectly fine, although there is some formatting I'd like to fix there, mostly the indentation. I would also suggest for next time to consider using try-with-resources clauses to potentially make your code more concise. You don't need to do that but I just thought I'd share it to teach you about it in case you didn't know. In terms of the readability for the target audience, there were a couple of places where I thought your explanations could be clearer (which I will show you when I am able to). Also, I like making a Github repo or a Replit for people to more easily access the code but it should be fine here since it is fairly easy just to copy and paste everything into your IDE but consider doing that for future articles. In terms of technical inaccuracies, there were a few that I found but nothing major. I will post the specifics soon.

Your code snippets are not formatted properly (mainly the indentation). Format them like this instead:
    while (true) {
        try {

            socket = serversocket.accept();

            inputStreamReader = new InputStreamReader(socket.getInputStream());
            outputStreamWriter = new OutputStreamWriter(socket.getOutputStream());
            bufferedReader = new BufferedReader(inputStreamReader);
            bufferedWriter = new BufferedWriter(outputStreamWriter);
            while (true)
            {
                String msgFromClient = bufferedReader.readLine();
                System.out.println("Client: " + msgFromClient);
                bufferedWriter.write(" MSG Received");
                bufferedWriter.newLine();
                bufferedWriter.flush();
                if (msgFromClient.equalsIgnoreCase("BYE"))
                    break;
            }
            socket.close();
            inputStreamReader.close();
            outputStreamWriter.close();
            bufferedReader.close();
            bufferedWriter.close();

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

package com.company;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {

    public static void main(String[] args) throws IOException {
        Socket socket ;
        InputStreamReader inputStreamReader ;
        OutputStreamWriter outputStreamWriter ;
        BufferedReader bufferedReader ;
        BufferedWriter bufferedWriter ;
        ServerSocket serversocket ;

        serversocket = new ServerSocket(5000);

        while (true) {
            try {

                socket = serversocket.accept();

                inputStreamReader = new InputStreamReader(socket.getInputStream());
                outputStreamWriter = new OutputStreamWriter(socket.getOutputStream());
                bufferedReader = new BufferedReader(inputStreamReader);
                bufferedWriter = new BufferedWriter(outputStreamWriter);
                while (true)
                {
                    String msgFromClient = bufferedReader.readLine();
                    System.out.println("Client: " + msgFromClient);
                    bufferedWriter.write(" MSG Received");
                    bufferedWriter.newLine();
                    bufferedWriter.flush();
                    if (msgFromClient.equalsIgnoreCase("BYE"))
                        break;
                }
                socket.close();
                inputStreamReader.close();
                outputStreamWriter.close();
                bufferedReader.close();
                bufferedWriter.close();

            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

package com.company;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class Client {
    public static void main(String[] args) {
        Socket socket = null;
        InputStreamReader inputStreamReader = null;
        OutputStreamWriter outputStreamWriter = null;
        BufferedReader bufferedReader = null;
        BufferedWriter bufferedWriter = null;

        try {
            socket = new Socket("localhost", 5000);
            inputStreamReader = new InputStreamReader(socket.getInputStream());
            outputStreamWriter = new OutputStreamWriter(socket.getOutputStream());
            bufferedReader = new BufferedReader(inputStreamReader);
            bufferedWriter = new BufferedWriter(outputStreamWriter);
            Scanner scanner = new Scanner(System.in);
            while (true)
            {
                String msgToSend = scanner.nextLine();
                bufferedWriter.write(msgToSend);
                bufferedWriter.newLine();
                bufferedWriter.flush();

                System.out.println("Server: " + bufferedReader.readLine());

                if (msgToSend.equalsIgnoreCase("BYE"))
                    break;
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (socket != null)
                    socket.close();
                if (inputStreamReader != null)
                    inputStreamReader.close();
                if (outputStreamWriter != null)
                    outputStreamWriter.close();
                if (bufferedReader != null)
                    bufferedReader.close();
                if (bufferedWriter != null)
                    bufferedWriter.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

This makes it far easier to read and follows convention.

@apondi-911 I will give this article a review then it will be set to go. @john-amiscaray is taking a short break. Thanks

Hello MikeWanja 👋

@WanjaMIKE hello

Hello👋 am enquiring about my article
On Wed, Jul 7, 2021, 20:53 hectorkambow @.***> wrote:

@john-amiscaray https://github.com/john-amiscaray
Will be reviewing this one 🚀
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/section-engineering-education/engineering-education/pull/2826#issuecomment-875807444,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT7YMXFE2QOQ4ONJPPLRAJ3TWSIANANCNFSM4724PH6A
.

Hey 👋  @apondi-911
Wajna will continue the review whenever she has free time.

starting the review @apondi-911

Overall great work @apondi-911
Very easy to follow along
cc @WanjaMIKE


Feature Request: Internal CA can sign CSRs in UI

Hi,
Please consider adding to the existing Certificate Authority UI functionality to sign an existing CSR. Presently the UI only permits generating a CSR from scratch or importing existing private key and public cert.
I use OPNsense as my in-house CA and not all devices accept uploads of pre-generated keys/certs.
Thanks!

Hi @pwhack,
This is a nice feature. I'm tagging it "help wanted" to see if anybody will help to get this in. :)
Cheers,
Franco

This feature would be great as it would complete the whole Trust functionality.
What would be required to implement this? Can opnsense already handle certificates without available private key at all?
Regards

I'm guessing system_certmanager.php just needs a function to wrap around PHP's openssl_csr_sign(). Much of system_certmanager.php is already doing similar wrapping with logic so someone familiar with that that file's logic likely knows the right spot to add such a logic branch.

Any chance this will happen? i can't code but willing to test.
thank you

I'd also love seeing this feature implemented. How can I help?

@wschlich It's probably not very difficult to add, but I haven't looked at it. It's probably best to start with describing some steps how to do this end to end (openssl commands), so we have an easy test scenario. Then check where this would fit the ui.
If I'm understanding the request correctly, then this would only use a ca to generate a cert, which the user can copy-paste into his application. It wouldn't be necessary to store the result, right?

@wschlich it seems @nhirokinet made an initial proposal https://github.com/opnsense/core/pull/3234 If your would like to do some testing, that would be very nice.

opnsense-patch 07b41fc4

@wschlich It's probably not very difficult to add, but I haven't looked at it. It's probably best to start with describing some steps how to do this end to end (openssl commands), so we have an easy test scenario. Then check where this would fit the ui.

I see. Shouldn't be a big deal.

If I'm understanding the request correctly, then this would only use a ca to generate a cert, which the user can copy-paste into his application. It wouldn't be necessary to store the result, right?

It would be about generating a certificate by signing a request (CSR) uploaded/pasted by the user.
I would vote for storing the result/certificate for reference purposes, because it would also need to be revokable via the CRL etc. -- it would just not have a private key part, compared to other certificates issues by OPNsense.

@wschlich it seems @nhirokinet made an initial proposal #3234 If your would like to do some testing, that would be very nice.

Okay, will do :)

@wschlich it seems @nhirokinet made an initial proposal #3234 If your would like to do some testing, that would be very nice.

Worked well so far -- got a certificate signed successfully :)
Also, the certificate is stored just like others.
Had some comments placed in the pull request (https://github.com/opnsense/core/pull/3234/commits/07b41fc43a275e3aa4d8676fbb9749cedd0cdfa5) -- mainly cosmetic issues.

Ok, so I did find an issue :)
My CSR contained a 'X509v3 Subject Alternative Name' but the certificated generated from signing that CSR doesn't have a SAN.

https://github.com/opnsense/core/pull/3234

I'm very confused by this issue. It seems like a lot of work has been done and the feature merged, but as @wschlich mentions, SANs are dropped from the signed certificate, even though they are listed in the UI while signing the request (it reads them from the CSR just fine)

I'm very confused by this issue. It seems like a lot of work has been done and the feature merged, but as @wschlich mentions, SANs are dropped from the signed certificate, even though they are listed in the UI while signing the request (it reads them from the CSR just fine)

The same happens when trying to sign a CSR with basicConstraints=CA:TRUE. In the UI it is display, and the checkbox is set, but after creating the certificate it does NOT have CA:TRUE.


Migrate the app to Null Safety

Migrate the project to null safety: https://dart.dev/null-safety/migration-guide

@himanshusharma89 I'd like to work on this.


broken links

Xbox Dev Store... page not found
Getting Started with Xbox One Development ... page not found
great job there

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 92ed0026-c3f2-65dd-6534-ffab9ed904fb
Version Independent ID: 7b228331-1813-5492-200f-2fb832f8682a
Content: Testing on the Xbox One console - Xbox Live
Content Source: xbox-live-docs-pr/testing-on-console.md
Product: xboxlive
GitHub Login: @aablackm
Microsoft Alias: aablackm

Hi - these links appear to be working when I tested them. Are you a managed partner who is still unable to access the links? If so, do you know how to reach your MS contact?
All the best,
Miriam

yes, thank you, they restored it later


testing protection effectiveness is needed

Hi,
Thanks for the nice work. I have tried fawkes to generate private images, it is kind of cool and the tool is very handy. However, I still don't find an empirical way or test to convince myself the protection is true. According to #59 #67, trying to test the effectiveness in our ways might be failed. As said in readme file, the test is actively worked on and will be ready shortly. So I wonder could you please provide at least one example for us to verify the protection?
Thank you very much!
Best,
Fan

to add to this a little bit, i would also find it useful to use a tool like this to compare the cloaking effectiveness of fawkes to the effectiveness of other methods that manipulate the image in barely-perceptible ways such as retouching an image with photoshop (mainly just for the curiosity).


Don't install all of lodash

Since we're only using lodash.merge, so install that only.

@knownasilya looks good, thanks. Can you squash?

All set


[typescript-react-query] _externalImportPrefix is not applied when using the import-types preset

Which packages are impacted by your issue?
@graphql-codegen/typescript-react-query
Describe the bug
Since updating to<EMAIL_ADDRESS>the prefix is missing for all types generated by this plugin. The problem are these lines: https://github.com/dotansimha/graphql-code-generator-community/blob/935b51f0777047102cc1c33a1a18a4527902e0f9/packages/plugins/typescript/react-query/src/visitor.ts#L148-L149
These variables are not used after this modification, only the generateConfig variable defined prior to these lines ( are passed to the functions on the next lines.
https://github.com/dotansimha/graphql-code-generator-community/blob/935b51f0777047102cc1c33a1a18a4527902e0f9/packages/plugins/typescript/react-query/src/visitor.ts#L139-L146
I fixed it by setting it while defining this variable:
const generateConfig = {
  node,
  documentVariableName,
  operationResultType: this._externalImportPrefix + operationResultType,
  operationVariablesTypes: this._externalImportPrefix + operationVariablesTypes,
  hasRequiredVariables,
  operationName,
};

Your Example Website or App

Steps to Reproduce the Bug or Issue
Run a codegen with the typescript-react-query plugin and the preset import-types. Config:
'./libs/shared/api/src/lib/src/generated.client.ts': {
      documents: [
        './libs/shared/api/src/lib/graphql/client/**/*.graphql',
        './libs/shared/api/src/lib/graphql/shared/**/*.graphql',
      ],
      plugins: ['typescript-react-query'],
      preset: 'import-types',
      presetConfig: {
        typesPath: './generated.types',
      },
      config: {
        namingConvention: {
          enumValues: 'keep',
        },
        importOperationTypesFrom: 'Types',
        reactQueryVersion: 5,
        fetcher: './fetcher#fetcher',
        exposeQueryKeys: true,
        exposeMutationKeys: true,
      },
    },

Expected behavior
It is possible to use the import-types preset.
Screenshots or Videos
No response
Platform

OS: [e.g. macOS]
NodeJS: [e.g. 20.8.0]
"graphql": "^16.8.1"
"@graphql-codegen/typescript-react-query": "6.0.0"
"@graphql-codegen/import-types-preset": "^3.0.0"

Codegen Config File
No response
Additional context
No response

I can open a PR, if someone has checked that this indeed is the problem.

I can confirm I'm having the same problem. It's importing
import * as OperationTypes from './operations.generated';
however, the types don't include the OperationTypes. prefix.
So, one solution I see is including the OperationTypes. and the other is updating the import to include the correct specific types


Error on Add-Migration InitialCreate

The current CSharpHelper cannot scaffold literals of type 'System.Collections.Generic.SortedDictionary2[System.ValueTuple2[System.String,System.String],Microsoft.EntityFrameworkCore.Metadata.Internal.Table]'. Configure your services to use one that can.
?? How do I do this???????

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7ac57b24-45aa-e679-6ff9-5a25c369c1ff
Version Independent ID: cc576199-b14c-a135-2291-cc48bf301b4e
Content: Getting Started - EF Core
Content Source: entity-framework/core/get-started/index.md
Product: entity-framework
Technology: entity-framework-core
GitHub Login: @Rick-Anderson
Microsoft Alias: avickers

@JakeSlade05 Please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate.

EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.


Fix links to marked

The repo moved the an org and the docs moved to a custom website

Also note that marked supports task lists now demo


[Feature] Support Tracing for GlobalFilter and GatewayFilter in Gateway

…g-cloud-gateway-plugin #12839

[ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
[ ] Update the CHANGES log.

You can see, your new codes break gateway-3.x-filter-context-scenario. That is another thing you should fix about the test scenarios.

Please update the Spring Gateway cases, UT is not enough to verify plugins codes. There are many test scenarios here, such as this is for 3.x GW.
If you don't know how to run this, please follow Plugin automatic test framework docs. You could change codes of those cases, and verify them locally with new expectation files.

Sure, I'll take a look at the documentation you provided first.

@wuwen5 Could you take a look at this?

I think the issue seems to be repetitive with this #539 , and we can support it in this way.
https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Application-toolkit-webflux.md#fetch-trace-context-relative-ids
@Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain){
        // fetch trace ID
        String traceId = WebFluxSkyWalkingTraceContext.traceId(exchange);

        // fetch segment ID
        String segmentId = WebFluxSkyWalkingTraceContext.segmentId(exchange);

        // fetch span ID
        int spanId = WebFluxSkyWalkingTraceContext.spanId(exchange);

        return chain.filter(exchange);
    }

@yqw570994511 Could you verify this new way? If it works, we don't need extra filter interceptor.

@yqw570994511 Could you verify this new way? If it works, we don't need extra filter interceptor.

Thank you, I'll try this way

I think the issue seems to be repetitive with this #539 , and we can support it in this way.
https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Application-toolkit-webflux.md#fetch-trace-context-relative-ids
@Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain){
        // fetch trace ID
        String traceId = WebFluxSkyWalkingTraceContext.traceId(exchange);

        // fetch segment ID
        String segmentId = WebFluxSkyWalkingTraceContext.segmentId(exchange);

        // fetch span ID
        int spanId = WebFluxSkyWalkingTraceContext.spanId(exchange);

        return chain.filter(exchange);
    }

Thank you, I'll try this way

I think the issue seems to be repetitive with this #539 , and we can support it in this way.
https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Application-toolkit-webflux.md#fetch-trace-context-relative-ids
@Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain){
        // fetch trace ID
        String traceId = WebFluxSkyWalkingTraceContext.traceId(exchange);

        // fetch segment ID
        String segmentId = WebFluxSkyWalkingTraceContext.segmentId(exchange);

        // fetch span ID
        int spanId = WebFluxSkyWalkingTraceContext.spanId(exchange);

        return chain.filter(exchange);
    }

I tried it according to the method you gave, and it achieved the same effect as my previous code:

I got the following result:

But when I am in another situation, it can't meet my needs.
My project is configured with logback to output skywalking's traceId to help me track problems, but using the above method, I can see that skywalking's traceId is not output.
In the production environment, I really need my log to print out the traceId, and I also hope that I can achieve this goal by writing business code as much as possible. For example, I hope my filter code can output the traceId in the log like this:

The result of using the new solution is as follows:

I think the new scheme can support more scenarios and should help many people like me who have similar needs.

If this targets to support custom filters, I think it makes sense.

My situation is similar to yours, the issue of logback not outputting tid can be resolved through
WebFluxSkyWalkingOperators.continueTracing(serverWebExchange, callable);
Solution to the interceptor code for the package gateway

The problem I found is that when the gateway forwards to downstream web services, the traceId changes and the entire process is not linked together

Why ping me?

Why ping me?

The tid of the log printed in the spring gateway interceptor is inconsistent with the tid of the log printed in the downstream service interceptor after forwarding. Is there any way to troubleshoot?

I am not following. How to debug Agent and plugins are common knowledge.
There is nothing special at my side.

Here is a pull request discussion. Please don't mix things here.

It is good to see tests are passed. Thanks.
One question about this doc, with your new plugin gets merged, does user still need to add manual codes? Which scenarios are automatically working, which are still not?

I tried it according to the method you gave, and it achieved the same effect as my previous code
@Component public class Filter1 implements GlobalFilter, Ordered {     private static final Logger log = LoggerFactory.getLogger(Filter1.class);     @Override     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {         // fetch trace ID         String traceId = WebFluxSkyWalkingTraceContext.traceId(exchange);         // fetch segment ID         String segmentId = WebFluxSkyWalkingTraceContext.segmentId(exchange);         // fetch span ID         int spanId = WebFluxSkyWalkingTraceContext.spanId(exchange);         log.info("filter1 traceId: {}, segmentId: {}, spanId: {}", traceId, segmentId, spanId);         return chain.filter(exchange);     }     @Override     public int getOrder() {         return -100;     } }
I got the following result

But when I am in another situation, it can't meet my needs. My project is configured with logback to output skywalking's traceId to help me track problems, but using the above method, I can see that skywalking's traceId is not output. In the production environment, I really need my log to print out the traceId, and I also hope that I can achieve this goal by writing business code as much as possible. For example, I hope my filter code can output the traceId in the log like this:
@Component public class Filter1 implements GlobalFilter, Ordered {     private static final Logger log = LoggerFactory.getLogger(Filter1.class);     @Override     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {         log.info("filter1 running");         return chain.filter(exchange);     }     @Override     public int getOrder() {         return -100;     } }
The result of using the new solution is as follows:

I think the new scheme can support more scenarios and should help many people like me who have similar needs

I think the issue seems to be repetitive with this #539 , and we can support it in this way.
https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Application-toolkit-webflux.md#fetch-trace-context-relative-ids
@Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain){
        // fetch trace ID
        String traceId = WebFluxSkyWalkingTraceContext.traceId(exchange);

        // fetch segment ID
        String segmentId = WebFluxSkyWalkingTraceContext.segmentId(exchange);

        // fetch span ID
        int spanId = WebFluxSkyWalkingTraceContext.spanId(exchange);

        return chain.filter(exchange);
    }

I think the issue seems to be repetitive with this #539 , and we can support it in this way.
https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Application-toolkit-webflux.md#fetch-trace-context-relative-ids
@Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain){
        // fetch trace ID
        String traceId = WebFluxSkyWalkingTraceContext.traceId(exchange);

        // fetch segment ID
        String segmentId = WebFluxSkyWalkingTraceContext.segmentId(exchange);

        // fetch span ID
        int spanId = WebFluxSkyWalkingTraceContext.spanId(exchange);

        return chain.filter(exchange);
    }

I tried it according to the method you gave, and it achieved the same effect as my previous code
@Component public class Filter1 implements GlobalFilter, Ordered {     private static final Logger log = LoggerFactory.getLogger(Filter1.class);     @Override     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {         // fetch trace ID         String traceId = WebFluxSkyWalkingTraceContext.traceId(exchange);         // fetch segment ID         String segmentId = WebFluxSkyWalkingTraceContext.segmentId(exchange);         // fetch span ID         int spanId = WebFluxSkyWalkingTraceContext.spanId(exchange);         log.info("filter1 traceId: {}, segmentId: {}, spanId: {}", traceId, segmentId, spanId);         return chain.filter(exchange);     }     @Override     public int getOrder() {         return -100;     } }
I got the following result

But when I am in another situation, it can't meet my needs. My project is configured with logback to output skywalking's traceId to help me track problems, but using the above method, I can see that skywalking's traceId is not output. In the production environment, I really need my log to print out the traceId, and I also hope that I can achieve this goal by writing business code as much as possible. For example, I hope my filter code can output the traceId in the log like this:
@Component public class Filter1 implements GlobalFilter, Ordered {     private static final Logger log = LoggerFactory.getLogger(Filter1.class);     @Override     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {         log.info("filter1 running");         return chain.filter(exchange);     }     @Override     public int getOrder() {         return -100;     } }
The result of using the new solution is as follows:

I think the new scheme can support more scenarios and should help many people like me who have similar needs

It is good to see tests are passed. Thanks.
One question about this doc, with your new plugin gets merged, does user still need to add manual codes? Which scenarios are automatically working, which are still not?

Writing code similar to this is enough:
`
@Component
public class Filter1 implements GlobalFilter, Ordered {
private static final Logger log = LoggerFactory.getLogger(Filter1.class);
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
    log.info("filter1 running");

    // fetch trace ID
    String traceId = TraceContext.traceId();
    log.info("filter1 traceId: {}", traceId);

    // fetch segment ID
    String segmentId = TraceContext.segmentId();
    log.info("filter1 segmentId: {}", segmentId);

    // fetch span ID
    int spanId = TraceContext.spanId();
    log.info("filter1 spanId: {}", spanId);

    return chain.filter(exchange);
}
@Override
public int getOrder() {
    return -100;
}

}

@Component
public class GatewayFilter1 implements GatewayFilter {
private static final Logger log = LoggerFactory.getLogger(GatewayFilter1.class);
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
    log.info("gatewayFilter1 running");
    return chain.filter(exchange);
}

}
`
The results obtained are as follows:

Could you reformat your comment? It is a little chaos from reading. I tried to edit but still not clear.

The reason I am asking about, is not doubting your PR. The key is, I want to set up a good boundary for community users.
How much does this PR resolve the issues about the manual codes required? In which cases, they still need to consider adding those codes.
Could you focus on that?

Because in this doc, it mentioned about fetching trace IDs, I had known they are not able to output in the same place of the logs. We don't need to talk about that part.
The question is, are all filters logs carrying logs automatically now? Or some fliters can, others can't. If it is later, then which filters still can't have the automatic injected trace contexts in their logs.

It is good to see tests are passed. Thanks.
One question about this doc, with your new plugin gets merged, does user still need to add manual codes? Which scenarios are automatically working, which are still not?

Writing code similar to this is enough:
@Component
public class Filter1 implements GlobalFilter, Ordered {

    private static final Logger log = LoggerFactory.getLogger(Filter1.class);
    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        log.info("filter1 running");

        // fetch trace ID
        String traceId = TraceContext.traceId();
        log.info("filter1 traceId: {}", traceId);

        // fetch segment ID
        String segmentId = TraceContext.segmentId();
        log.info("filter1 segmentId: {}", segmentId);

        // fetch span ID
        int spanId = TraceContext.spanId();
        log.info("filter1 spanId: {}", spanId);

        return chain.filter(exchange);
    }
    @Override
    public int getOrder() {
        return -100;
    }
}

@Component
public class GatewayFilter1 implements GatewayFilter {

    private static final Logger log = LoggerFactory.getLogger(GatewayFilter1.class);
    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        log.info("gatewayFilter1 running");
        return chain.filter(exchange);
    }
}

The results obtained are as follows:

Is there any filter not supposed?

Because in this doc, it mentioned about fetching trace IDs, I had known they are not able to output in the same place of the logs. We don't need to talk about that part.
The question is, are all filters logs carrying logs automatically now? Or some fliters can, others can't. If it is later, then which filters still can't have the automatic injected trace contexts in their logs.

Any filter that implements the GlobalFilter and GatewayFilter interfaces can be supported. If the user only calls the code chain.filter(exchange) in each filter, the traceId will be fully recorded. However, if the user writes this code chain.filter(exchange).then(), the code in then() will not be able to obtain the traceId. In this case, you need to manually call WebFluxSkyWalkingTraceContext.traceId(exchange) in then() to obtain it. Here is an example:
@Component
public class Filter1 implements GlobalFilter, Ordered {

    private static final Logger log = LoggerFactory.getLogger(Filter1.class);
    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        log.info("filter1 running");

        // fetch trace ID
        String traceId = TraceContext.traceId();
        log.info("filter1 traceId: {}", traceId);

        // fetch segment ID
        String segmentId = TraceContext.segmentId();
        log.info("filter1 segmentId: {}", segmentId);

        // fetch span ID
        int spanId = TraceContext.spanId();
        log.info("filter1 spanId: {}", spanId);

        return chain.filter(exchange).then(Mono.fromRunnable(() -> {
            log.info("filter1 then running");

            // fetch trace ID
            String traceId2 = TraceContext.traceId();
            log.info("filter1 then traceId: {}", traceId2);

            // fetch segment ID
            String segmentId2 = TraceContext.segmentId();
            log.info("filter1 then segmentId: {}", segmentId2);

            // fetch span ID
            int spanId2 = TraceContext.spanId();
            log.info("filter1 then spanId: {}", spanId2);
        }));
    }
    @Override
    public int getOrder() {
        return -100;
    }
}

result:

@Component
public class Filter2 implements GlobalFilter, Ordered {

    private static final Logger log = LoggerFactory.getLogger(Filter2.class);
    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        log.info("filter2 running");

        // fetch trace ID
        String traceId = TraceContext.traceId();
        log.info("filter2 traceId: {}", traceId);

        // fetch segment ID
        String segmentId = TraceContext.segmentId();
        log.info("filter2 segmentId: {}", segmentId);

        // fetch span ID
        int spanId = TraceContext.spanId();
        log.info("filter2 spanId: {}", spanId);
        return chain.filter(exchange).then(Mono.fromRunnable(() -> {
            String traceId2 = WebFluxSkyWalkingTraceContext.traceId(exchange);
            log.info("filter2 then traceId: {}", traceId2);

            String segmentId2 = WebFluxSkyWalkingTraceContext.segmentId(exchange);
            log.info("filter2 then segmentId: {}", segmentId2);

            int spanId2 = WebFluxSkyWalkingTraceContext.spanId(exchange);
            log.info("filter2 then spanId: {}", spanId2);
        }));
    }

    @Override
    public int getOrder() {
        return 10;
    }
}

result:

Because in this doc, it mentioned about fetching trace IDs, I had known they are not able to output in the same place of the logs. We don't need to talk about that part.
The question is, are all filters logs carrying logs automatically now? Or some fliters can, others can't. If it is later, then which filters still can't have the automatic injected trace contexts in their logs.

Is there any filter not supposed?

The GlobalFilter and GatewayFilter loaded by default by the Spring Gateway will also be intercepted. Do you think this is an unnecessary filter?

I didn't have a concept which interceptor is necessary or unnecessary.
I just wanted to setup a feature boundaries.
It is good enough now.
Could you polish the codes by review? I think we are almost good.

I didn't have a concept which interceptor is necessary or unnecessary. I just wanted to setup a feature boundaries. It is good enough now.
Could you polish the codes by review? I think we are almost good.

Thank you, I will adjust my code as follows
public class GatewayFilterInterceptor implements InstanceMethodsAroundInterceptor {

    private static final ThreadLocal<AtomicInteger> STACK_DEEP = ThreadLocal.withInitial(() -> new AtomicInteger(0));

    @Override
    public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
                             MethodInterceptResult result) throws Throwable {
        if (isEntry()) {
            ServerWebExchange exchange = (ServerWebExchange) allArguments[0];

            EnhancedInstance enhancedInstance = getInstance(exchange);

            AbstractSpan span = ContextManager.createLocalSpan("SpringCloudGateway/GatewayFilter");
            if (enhancedInstance != null && enhancedInstance.getSkyWalkingDynamicField() != null) {
                ContextManager.continued((ContextSnapshot) enhancedInstance.getSkyWalkingDynamicField());
            }
            span.setComponent(SPRING_CLOUD_GATEWAY);
        }
    }

    public static EnhancedInstance getInstance(Object o) {
        EnhancedInstance instance = null;
        if (o instanceof DefaultServerWebExchange) {
            instance = (EnhancedInstance) o;
        } else if (o instanceof ServerWebExchangeDecorator) {
            ServerWebExchange delegate = ((ServerWebExchangeDecorator) o).getDelegate();
            return getInstance(delegate);
        }
        return instance;
    }

    @Override
    public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
                              Object ret) throws Throwable {
        if (isExit()) {
            if (ContextManager.isActive()) {
                ContextManager.stopSpan();
            }
        }
        return ret;
    }

    @Override
    public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
                                      Class<?>[] argumentsTypes, Throwable t) {
        ContextManager.activeSpan().log(t);
    }

    private boolean isEntry() {
        return STACK_DEEP.get().getAndIncrement() == 0;
    }

    private boolean isExit() {
        boolean isExit = STACK_DEEP.get().decrementAndGet() == 0;
        if (isExit) {
            STACK_DEEP.remove();
        }
        return isExit;
    }
}

I posted this discussion according to your comments, https://github.com/apache/skywalking/discussions/12860

Why ping me?

The tid of the log printed in the spring gateway interceptor is inconsistent with the tid of the log printed in the downstream service interceptor after forwarding. Is there any way to troubleshoot?

Maybe you need to add spring-cloud-gateway plugin to your projcet.


Compose up errors with "This project already exists."

When running compose up, the first time the services are started fine. If I then try to run compose up again, whether the docker-compose.yml has changed or not, it always answers with "This project already exists."
What I expect: that compose up updates the services.
How to reproduce:

Create docker-compose.yml file with a service definition.
Run hyper compose up and wait until services start.
Modify docker-compose.yml.
Attempt to run hyper compose up again.

Versions:

hyper -v: Hyper version 1.10.4, build 6fe5465
uname -a: Linux felix-probook 4.8.4-1-ARCH #1 SMP PREEMPT Sat Oct 22 18:26:57 CEST 2016 x86_64 GNU/Linux
Hyper cloud: tcp://us-west-1.hyper.sh:443

I suppose this is the offending line? https://github.com/hyperhq/hypercli/blob/28bda292be7929beae13d1b4667191fd6f55fa0a/api/client/compose.go#L137 The command always attempts to create a project, instead of checking whether it already exists.

Then I did a hyper compose rm to try to start over, forgetting I had to compose kill first. Instead of erroring, or of killing the services before removing, it succeeded:
Project [quotes]: Project deleted

But when I tried to bring it back up:
$ hyper compose up
Project [quotes]: Starting project
[0/2] [db]: Starting
[0/2] [web]: Starting
The dotted field 'sh.hyper.compose.oneoff' in 'base.config.labels.sh.hyper.compose.oneoff' is not valid for storage.

I have no idea what that means.
Further, the containers seem to still exist (when looked at with hyper ps) and are still up.
It seems like the compose subcommand is completely broken in various ways :(

@passcod
hyper compose is a little different from docker-compose, since docker-compose only operate the docker container via docker API, but hyper compose has it's own compose API.
It will save the compose project if you up or create a compose project, and you can not do it again if the previous operation was successful, since the duplicate project name checking will fail.  The only way to update the compose project is down your compose project and up'/create` it again.
Thanks,

You might want to change the docs, then, because it doesn't say that.
On Tue, 8 Nov 2016, 20:46 Lei Xue<EMAIL_ADDRESS>wrote:

@passcod https://github.com/passcod
hyper compose is a little different from docker-compose, since
docker-compose only operate the docker container via docker API, but hyper
compose has it's own compose API.
It will save the compose project if you up or create a compose project,
and you can not do it again if the previous operation was successful, since
the duplicate project name checking will fail. The only way to update the
compose project is down your compose project and up'/create` it again.
Thanks,
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hyperhq/hypercli/issues/176#issuecomment-259068119,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJgi2oyZv367DAoSrpX8gIKnLkiCUC6ks5q8CjPgaJpZM4Kr_4m
.

@carmark down and up sequence does work but it creates new volumes leaving previous one dangling. Is there a way to update the project and reuse the volumes?


wavfile: Raise verbose error when no data chunks are found

Previously, we would just crash with an unbound local error.
Reference issue
The internet is pretty full of this exact error. Just google for "scipy.wavfile UnboundLocalError".
What does this implement/fix?
This gives a more useful error when we cannot read a wav file instead of straight up crashing.

@jaseg friendly reminder.


Open and Play icons in the Load dropdown need hover states

Maybe they start at .8 opacity and go to 1 on hover

done.


Videobyte - Update media types and note

Thanks for the update. Next question: is there a code pull request associated with this docs PR? I don't see anything in the Prebid.js repo.

Thanks for the update. Next question: is there a code pull request associated with this docs PR? I don't see anything in the Prebid.js repo.

No, this PR is just for updating the docs. This PR was the latest Prebid Server update https://github.com/prebid/prebid-server/pull/2058.
One question for you - VideoByte is listed here in the list https://docs.prebid.org/dev-docs/pbs-bidders.html, but when the link is clicked nothing happens. Can you take a look please?

Ugh - sorry, another adapter doc file had a typo so it screwed up everyone beneath it. Fixed.


Automatted Payment and Subscription Handling

Link to feature: https://basis-international.productboard.com/feature-board/planning/features/20180816